1
0
Fork 0
firefox/testing/web-platform/tests/css/css-cascade/scope-import-scope-end.tentative.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

27 lines
891 B
HTML

<!DOCTYPE html>
<title>@import scope() with &lt;scope-end&gt;</title>
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/7348">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
@import url("resources/scope-imported.css") scope((.scope) to (.limit));
</style>
<main id=main>
<div class=scope>
<div class=x>Inside</div>
<div class=limit>
<div class=x>Below limit</div>
</div>
</div>
</main>
<script>
test(() => {
let e = main.querySelector('.scope > .x');
assert_equals(getComputedStyle(e).getPropertyValue('--x'), '1');
}, 'Scope-imported rule applies within scope, above limit');
test(() => {
let e = main.querySelector('.limit > .x');
assert_equals(getComputedStyle(e).getPropertyValue('--x'), '');
}, 'Scope-imported rule does not apply below limit');
</script>