tor-browser

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

fallback-nested-var.tentative.html (670B)


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