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 : positive
- Firefox for Android ❌ See bugzil.la/1953973 Vendor position : positive
- Safari ❌ See webkit.org/b/294895 Vendor position : unknown
- Safari on iOS ❌ See webkit.org/b/294895 Vendor position : unknown
Developer signals
- State of CSS 2025: reading_list/reading_list question
- State of CSS 2025: features/all_features question
Web Platform Tests (WPT)
View the latest WPT test results for this featureView as JSON | Edit this feature | Report an issue | Web-features entry: source, dist