tor-browser

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

apply-top-level.html (750B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <title>CSS Mixins: @apply is invalid at top level</title>
      5    <link rel="help" href="https://drafts.csswg.org/css-mixins-1/#apply-rule">
      6    <script src="/resources/testharness.js"></script>
      7    <script src="/resources/testharnessreport.js"></script>
      8    <style>
      9      .cls {
     10        color: green;
     11      }
     12      @mixin --m1() {
     13        .cls {
     14          color: red;
     15        }
     16      }
     17      @apply --m1;
     18    </style>
     19  </head>
     20  <body>
     21    <div><div class="cls" id="target">This text should be green.</div></div>
     22    <script>
     23      test(() => {
     24        let target = document.getElementById('target');
     25        assert_equals(getComputedStyle(target).color, 'rgb(0, 128, 0)');
     26      });
     27    </script>
     28  </body>
     29 </html>