tor-browser

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

nth-last-child-of-in-shadow-root.html (832B)


      1 <!doctype html>
      2 <meta charset="utf-8">
      3 <title>CSS Selectors Invalidation: :nth-last-child(... of class) within shadow root</title>
      4 <link rel="author" title="Zach Hoffman" href="mailto:zach@zrhoffman.net">
      5 <link rel="author" title="Steinar H. Gunderson" href="mailto:sesse@chromium.org">
      6 <link rel="match" href="nth-last-child-of-in-shadow-root-ref.html">
      7 <link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index">
      8 <div id="host">
      9  <template shadowrootmode="open">
     10    <style>
     11      div:nth-last-child(even of .foo) {
     12        color: green;
     13      }
     14    </style>
     15    <div class="foo">Should be green</div>
     16    <div class="foo">No green</div>
     17    <div class="foo" id="toggler">No green</div>
     18  </template>
     19 </div>
     20 <script>
     21  host.offsetTop;
     22  host.shadowRoot.getElementById("toggler").classList.toggle("foo");
     23 </script>