<sibling-count>
A new experimental function that returns the total number of siblings an element has. This allows you to style elements based on how many items are currently in a list without using JavaScript.
Syntax
/* Usage Example */
.grid-item {
/* Make items larger if there are only a few in the list */
width: calc(100% / sibling-count());
}
<sibling-count> Browser support
Limited availability
Since
2020 70% global usage
This feature is not Baseline because it does not work in some of the most widely-used browsers.
138+
26.2+
138+