Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!DOCTYPE html>
<title>CSS Container Queries Test: style query against document element</title>
<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>