sibling-count() and sibling-index()
The sibling-count()
and sibling-index()
CSS functions return integers that are useful to style elements based on their positions among siblings or on the number of siblings, for example as part of a calc()
expression.
Status
Limited availability
MDN documentation
Specifications
Browser support
- Chrome 138 Released on 2025-06-24
- Chrome Android 138 Released on 2025-06-24
- Edge 138 Released on 2025-06-26
- Firefox ❌ See bugzil.la/1953973 Vendor position : unknown
- Firefox for Android ❌ See bugzil.la/1953973 Vendor position : unknown
- Safari ❌ Vendor position : unknown
- Safari on iOS ❌ Vendor position : unknown
View as JSON | Edit this feature | Report an issue | Web-features entry: source, dist