Status: FAIL | Duration: 10ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/selectors/invalidation/nth-child-containing-ancestor.html
<!DOCTYPE html> <meta charset="utf-8" /> <title>CSS Selectors Invalidation: :nth-child(... of S) with ancestor in S</title> <link rel="author" title="Steinar H. Gunderson" href="sesse@chromium.org"> <link rel="match" href="nth-child-containing-ancestor-ref.html"> <link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <style> div:nth-child(odd of .a .b) { color: green; } </style> <div id="toggler"> <div> <div> <div class="b">Should be green</div> </div> </div> </div> <script> document.documentElement.offsetTop; toggler.classList.toggle("a"); </script>
/css/selectors/invalidation/nth-child-containing-ancestor-ref.html
<!DOCTYPE html> <meta charset="utf-8" /> <title>CSS Selectors Invalidation: :nth-child(... of S) with ancestor in S</title> <link rel="author" title="Steinar H. Gunderson" href="sesse@chromium.org"> <link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <div> <div> <div> <div style="color: green">Should be green</div> </div> </div> </div>