Skip to content

[css-values-5] Don't use flat tree for tree-counting #9562 #12144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 2, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions css-values-5/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2755,7 +2755,7 @@ Tree Counting Functions: the ''sibling-count()'' and ''sibling-index()'' notatio
as an <<integer>>,
the index of the element
on which the notation is used
among the children of its parent.
among its [=inclusive siblings=].
Like '':nth-child()'',
''sibling-index()'' is 1-indexed.

Expand Down Expand Up @@ -2803,9 +2803,9 @@ Tree Counting Functions: the ''sibling-count()'' and ''sibling-index()'' notatio

</div>

Note: Like the rest of CSS (other than [=selectors=]),
''sibling-count()'' and ''sibling-index()''
operate on the [=flat tree=].
Note: These functions, to match [=selectors=] like '':nth-child()'', operate on the DOM tree,
rather than the [=flat tree] like most CSS values do.
They may, in the future, have variants that support counting [=flat tree=] siblings.

Note: These functions may, in the future,
be extended to accept an ''of <<complex-real-selector-list>>'' argument,
Expand Down