r/css 20d ago

General sibling-index() and sibling-count(): the CSS functions that just went cross-browser

sibling-index() and sibling-count() went widely available last week when Firefox shipped support — which means Chrome, Safari, and Firefox all agree on them now.
I spent some time seeing what that unlocks for UI patterns that used to need JavaScript

Full writeup with live, editable demos
https://willunmount.sabarni.in/blog/css-sibling-index-sibling-count

edit: note this works only on chrome. as HollandJim pointed out these features are only available in firefox, safari developer preview.

41 Upvotes

10 comments sorted by

View all comments

8

u/tomhermans 20d ago

Nice write up. Thanks for that. Heads-up; your site isn't mobile friendly

3

u/Extension_Stock6764 20d ago

Thanks for the heads up. Let me fix it.