blob: 0154194e8c5ea56fcd9c3737db84af101898213b [file] [log] [blame] [edit]
<!DOCTYPE html>
<title>CSS Container Queries Test: style() query with guaranteed-invalid value</title>
<link rel="help" href="https://drafts.csswg.org/css-conditional-5/#style-container">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11143">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/cq-testcommon.js"></script>
<style>
#target { background-color: green; }
@container --root style(--prop: var(--unknown)) {
#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 with a guaranteed-invalid value should evaluate to false");
</script>