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
30 lines
966 B
HTML
30 lines
966 B
HTML
<!DOCTYPE html>
|
|
<title>@import scope(), :scope rules in imported stylesheet</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));
|
|
</style>
|
|
<main id=main>
|
|
<div class=scope>
|
|
<div class=inner-scope>
|
|
<div class=z>Inside</div>
|
|
</div>
|
|
</div>
|
|
<div class=inner-scope>
|
|
<div class=z>Outside</div>
|
|
</div>
|
|
</main>
|
|
<script>
|
|
test(() => {
|
|
let e = main.querySelector('.scope > .inner-scope > .z');
|
|
assert_equals(getComputedStyle(e).getPropertyValue('--z'), '1');
|
|
}, '@scope within scope-imported stylesheet matches');
|
|
|
|
test(() => {
|
|
let e = main.querySelector('#main > .inner-scope > .z');
|
|
assert_equals(getComputedStyle(e).getPropertyValue('--z'), '');
|
|
}, '@scope within scope-imported does not ignore import scope');
|
|
</script>
|