1
0
Fork 0
firefox/testing/web-platform/tests/css/css-conditional/container-queries/style-query-document-element.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

20 lines
612 B
HTML

<!DOCTYPE html>
<title>CSS Container Queries Test: style query against document element</title>
<link rel="help" href="https://drafts.csswg.org/css-conditional-5/#container-queries">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/cq-testcommon.js"></script>
<style>
html {
--foo: bar;
}
@container style(--foo: bar) {
body { color: green; }
}
</style>
<body id="body">
<script>
test(() => {
assert_equals(getComputedStyle(body).color, "rgb(0, 128, 0)");
}, "style query should evaluate to true");
</script>