mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
A few are skipped for now: - A few ref tests fail - Crash tests are not supported by our runner and time out - top-level-is-scope.html crashes and needs further investigation
20 lines
661 B
HTML
20 lines
661 B
HTML
<!DOCTYPE html>
|
|
<title>CSS Nesting: Specificity of top-level '&'</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-nesting-1">
|
|
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10196">
|
|
<script src="../../resources/testharness.js"></script>
|
|
<script src="../../resources/testharnessreport.js"></script>
|
|
<style>
|
|
/* Note: at the top level, '&' matches like ':root'. */
|
|
|
|
/* Should have zero specificity: */
|
|
& { color: red; }
|
|
/* Should also have zero specificity: */
|
|
:where(&) { color: green; }
|
|
</style>
|
|
<script>
|
|
test(() => {
|
|
assert_equals(getComputedStyle(document.documentElement).color, 'rgb(0, 128, 0)');
|
|
});
|
|
</script>
|