Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!doctype html>
<meta charset="utf-8">
<title>CSS Selectors Invalidation: :nth-last-child(... of attribute)</title>
<link rel="author" title="Zach Hoffman" href="mailto:zach@zrhoffman.net">
<link rel="author" title="Steinar H. Gunderson" href="mailto:sesse@chromium.org">
<link rel="match" href="nth-last-child-of-attr-ref.html">
<style>
p:nth-last-child(even of [attr="yes"]) {
color: green;
}
</style>
<div>
<p>Ignored</p>
<p attr="yes">Not ignored</p>
<p attr="yes">Not ignored</p>
<p attr="yes">Not ignored</p>
<p attr="yes" id="toggler">Selectively ignored</p>
<p attr="yes">Not ignored</p>
<p attr="no">Ignored</p>
<p>Ignored</p>
</div>
<script>
document.documentElement.offsetTop;
toggler.setAttribute("attr", "no");
</script>