mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
Update web-platform-tests to revision b'02400d32d48521baa38663fe8601779994fcfb78'
This commit is contained in:
parent
bc8cea2495
commit
f0bb7a6f9c
483 changed files with 12767 additions and 2644 deletions
|
@ -0,0 +1,35 @@
|
|||
<!doctype html>
|
||||
<title>CSS Container Queries Test: Invalidate style queries and display:contents</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-contain-3/#style-container">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="support/cq-testcommon.js"></script>
|
||||
<style>
|
||||
#container.contents {
|
||||
--foo: bar;
|
||||
display: contents;
|
||||
}
|
||||
#target {
|
||||
color: red;
|
||||
}
|
||||
@container style(--foo: bar) {
|
||||
#target {
|
||||
color: green;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div id="container">
|
||||
<div id="target">This should be green</div>
|
||||
</div>
|
||||
<script>
|
||||
setup(() => assert_implements_container_queries());
|
||||
|
||||
test(() => {
|
||||
assert_equals(getComputedStyle(target).color, "rgb(255, 0, 0)");
|
||||
}, "Initially the color is red");
|
||||
|
||||
test(() => {
|
||||
container.className = "contents";
|
||||
assert_equals(getComputedStyle(target).color, "rgb(0, 128, 0)");
|
||||
}, "After display and --foo changes, style() query causes the color to be green");
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue