at-supports-rule.https.html (626B)
1 <!DOCTYPE html> 2 <link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#valdef-display-layout"> 3 <meta name="assert" content="This test checks that a layout() function works correctly with an @supports rule." /> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <style> 7 #test { 8 content: 'fail'; 9 } 10 11 @supports (display: layout(foo)) { 12 #test { 13 content: 'pass'; 14 } 15 } 16 </style> 17 <div id="test"></div> 18 <script> 19 test(function() { 20 const element = document.getElementById('test'); 21 assert_equals(getComputedStyle(element).content, '"pass"'); 22 }); 23 </script>