tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

revert-rule-to-var.tentative.html (734B)


      1 <!DOCTYPE html>
      2 <title>CSS Custom Properties: Using revert-rule to revert to a var()</title>
      3 <link rel="help" href="https://drafts.csswg.org/css-variables/#substitute-a-var">
      4 <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10443">
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <style>
      8  #target {
      9    --green: green;
     10    color: var(--green);
     11  }
     12  #target {
     13    color: red;
     14    color: revert-rule;
     15  }
     16 </style>
     17 <div id=target>
     18 </div>
     19 <script>
     20  test((x) => {
     21    assert_true(CSS.supports('color:revert-rule'));
     22    assert_equals(getComputedStyle(target).color, 'rgb(0, 128, 0)');
     23  }, 'Using revert-rule to revert to a value containing var()');
     24 
     25 </script>