style-query-unset-on-root.html (735B)
1 <!DOCTYPE html> 2 <title>CSS Container Queries Test: query unset style for custom property on :root should always match</title> 3 <link rel="help" href="https://drafts.csswg.org/css-conditional-5/#style-container"> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <script src="support/cq-testcommon.js"></script> 7 <style> 8 :root { container-name: --root; } 9 @container --root style(--foo: unset) { 10 #target { color: green; } 11 } 12 </style> 13 <div id="target"></div> 14 <script> 15 setup(() => assert_implements_style_container_queries()); 16 17 test(() => { 18 assert_equals(getComputedStyle(target).color, "rgb(0, 128, 0)"); 19 }, "Match style(--foo: unset) on :root element"); 20 </script>