Advanced Tree Counting: Mathematical Layouts With sibling-index() And sibling-count() — Smashing Magazine
CSS’s new sibling-index() and sibling-count() functions let you compute element positions directly in styles, enabling staggered animations, equal widths, color distribution, etc., without JS, with Chrome/Safari support and fallback strategies.









