Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-conditional/container-queries/style-query-registered-custom-invalid.tentative.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Container Queries Test: style() query with IACVT value for registered custom property</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/cq-testcommon.js"></script>
<style>
:root { container-name: --root; }
@property --prop {
syntax: "a";
initial-value: a;
inherits: true;
}
#target { background-color: green; }
@container --root style(--prop: b) {
#target { background-color: red; }
}
</style>
<div id="target"></div>
<script>
setup(() => assert_implements_style_container_queries());
test(() => {
assert_equals(getComputedStyle(target).backgroundColor, "rgb(0, 128, 0)");
}, "Querying IACVT value for registered custom property should evaluate to false");
</script>