tor-browser

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

nth-child-whole-subtree.html (712B)


      1 <!DOCTYPE html>
      2 <title>CSS Selectors Invalidation: :nth-child(... of :not()) combined with whole subtree invalidation</title>
      3 <link rel="help" href="https://crbug.com/333420613">
      4 <link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index">
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <style>
      8  div:nth-child(odd of :not(.c)) {
      9    background-color: silver;
     10  }
     11  .c * {}
     12 </style>
     13 <div>Silver</div>
     14 <div id="d2" class="c">White</div>
     15 <div id="d3">Silver</div>
     16 <script>
     17  test(() => {
     18    document.body.offsetTop;
     19    d2.classList.value = '';
     20    assert_equals(getComputedStyle(d3).backgroundColor, 'rgb(192, 192, 192)');
     21  });
     22 </script>