attr-revert-rule.tentative.html (713B)
1 <!DOCTYPE html> 2 <title>The revert-rule keyword: interaction with attr()</title> 3 <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10443"> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 7 <style> 8 :root { 9 #test1 { 10 color: green; 11 } 12 #test1 { 13 color: red; 14 color: attr(data-unknown, revert-rule); 15 } 16 } 17 </style> 18 <div id=test1></div> 19 <script> 20 test(() => { 21 assert_true(CSS.supports('color:revert-rule')); 22 assert_true(CSS.supports('color:attr(data-unknown, revert-rule)')); 23 assert_equals(getComputedStyle(test1).color, 'rgb(0, 128, 0)') 24 }, 'The revert-rule works in an attr() fallback'); 25 </script>