tor-browser

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

scope-import-implicit.tentative.html (843B)


      1 <!DOCTYPE html>
      2 <title>@import scope(), implicit scope</title>
      3 <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/7348">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <main id=main>
      7  <div class=scope>
      8    <style>
      9    @import url("resources/scope-imported.css") scope();
     10    </style>
     11    <div class=x>Inside</div>
     12  </div>
     13  <div class=x>Outside</div>
     14 </main>
     15 <script>
     16  test(() => {
     17    let e = main.querySelector('.scope > .x');
     18    assert_equals(getComputedStyle(e).getPropertyValue('--x'), '1');
     19  }, 'Scope-imported rule applies within implicit scope');
     20 
     21  test(() => {
     22    let e = main.querySelector('main > .x');
     23    assert_equals(getComputedStyle(e).getPropertyValue('--x'), '');
     24  }, 'Scope-imported rule does not apply outside of implicit scope');
     25 </script>