21-05-2026 10:00 via smashingmagazine.com

Advanced Tree Counting: Mathematical Layouts With `sibling-index()` And `sibling-count()`

You know that thing where you have a grid of cards, and you want them to fade in one after another? That staggered cascade effect. Looks great. Should be simple. And yet every time I’ve built it, the implementation has made me feel like I’m doing something fundamentally stupid.What’s Coming
The current spec only counts all element siblings. But the CSSWG has documented a planned extension in issue #9572: an of <selector> argument, matching what :nth-child() already suppor
Read more »