UX Lift logo

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.

More from Smashing Magazine

© 2026. Made in Manchester by Matt Kevan.

Privacy

Cookies

Contact