nth-last-child-of-in-is.html (732B)
1 <!doctype html> 2 <meta charset="utf-8"> 3 <title>CSS Selectors Invalidation: :is(:nth-last-child(... of class))</title> 4 <link rel="author" title="Zach Hoffman" href="mailto:zach@zrhoffman.net"> 5 <link rel="match" href="nth-last-child-of-class-ref.html"> 6 <link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> 7 <style> 8 p:is(:nth-last-child(even of .c)) { 9 color: green; 10 } 11 </style> 12 <div> 13 <p>Ignored</p> 14 <p class="c">Not ignored</p> 15 <p class="c">Not ignored</p> 16 <p class="c">Not ignored</p> 17 <p class="c" id="toggler">Selectively ignored</p> 18 <p class="c">Not ignored</p> 19 <p>Ignored</p> 20 <p>Ignored</p> 21 </div> 22 <script> 23 document.documentElement.offsetTop; 24 toggler.classList.toggle("c"); 25 </script>