at-supports.tentative.html (636B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <link rel="help" href="https://drafts.csswg.org/css-env-1/"> 5 <title>Test that CSS env vars work with @support</title> 6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharnessreport.js"></script> 8 <style> 9 @supports (background-color: env(test)) { 10 body { background-color: rgb(0, 128, 0); } 11 } 12 </style> 13 </head> 14 <body> 15 <script> 16 test(() => { 17 const style = window.getComputedStyle(document.body); 18 assert_equals(style.getPropertyValue("background-color"), "rgb(0, 128, 0)"); 19 }); 20 </script> 21 </body> 22 </html>