You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CSS sibling-index() and sibling-count() functions #1460
sibling-index() and sibling-count() can be used as integers in CSS property values to style elements based on their position among its siblings, or the total number of siblings respectively. These functions can be used directly as integer values, but more interestingly inside calc() expressions.
Example:
li{margin-left:calc(10px*sibling-index());}
Example use cases for this are staggered animations setting the animation- or transition-delay based on the sibling position, and building a radial menu.
These functions are shipped in all engines, but all have wpt failures.
This comment was automatically generated based on the information you provided. Please don't edit it.
Below is additional information about the web feature (from the web-features project) which is referenced in your proposal.
If this doesn't accurately correspond to your proposal, please update your initial comment to include web-features: <feature-id>.
To find feature IDs, use the web-features explorer.
Feature sibling-count() and sibling-index()
ID: sibling-count
Name: sibling-count() and sibling-index()
Description: 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.
Activity
github-actions commentedon Sep 23, 2026
This comment was automatically generated based on the information you provided. Please don't edit it.
Below is additional information about the web feature (from the web-features project) which is referenced in your proposal.
If this doesn't accurately correspond to your proposal, please update your initial comment to include
web-features: <feature-id>.To find feature IDs, use the web-features explorer.
Feature sibling-count() and sibling-index()
sibling-count()andsibling-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 acalc()expression.sibling-count()CSS function,sibling-index()CSS functionjakearchibald commentedon Oct 8, 2026
This has now shipped across browsers, so this should close, right?
jakearchibald commentedon Oct 8, 2026
Ah, folks have pointed out this is about the remaining test failures.