Files
sousa-gecko/testing/web-platform/tests/css/css-cascade/scope-import-scope-end.html
T
Anders Hartvoll Ruud 2ac87e8d9a Bug 2025863 [wpt PR 58709] - [@scope] Drop tentative suffix for scoped import tests, a=testonly
Automatic update from web-platform-tests
[@scope] Drop tentative suffix for scoped import tests

This is now specified.

Bug: 369876911
Change-Id: I6f21067f2e8203bd5f3635c73242cb6e44a8e33b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7688598
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1604048}

--

wpt-commits: 601ea75cc784f0b6a72c59443f461b12ff4463e5
wpt-pr: 58709
2026-03-30 08:09:33 +00:00

28 lines
893 B
HTML

<!DOCTYPE html>
<title>@import scope() with &lt;scope-end&gt;</title>
<link rel="help" href="https://drafts.csswg.org/css-cascade-6/#at-import">
<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>