As of Firefox 154, I intend to turn the sibling-index() and sibling-count() CSS functions on by default on all platforms. These have been developed behind the layout.css.tree-counting-functions.enabled preference. These features have been shipped in other browsers since Chrome 138 and Safari 26.2.
Bugs:
- Bug 1953973 - [css-values] Add sibling-count() and sibling-index() - Main bug.
- Bug 2045706 - Set layout.css.tree-counting-functions.enabled for all users - Bug to launch feature.
Standard:
https://drafts.csswg.org/css-values-5/#tree-counting
Intent to Prototype Thread:
https://groups.google.com/a/mozilla.org/g/dev-platform/c/6Pmh63BB1bc
Changes Since Intent to Prototype:
Two DevTool bugs were filed by Nicolas related to colors that use sibling-index()/sibling-count(): Bug 2047874 and Bug 2047871.