Skip to content

Conversation

ramiy
Copy link
Contributor

@ramiy ramiy commented Aug 21, 2025

Description

Fix bad example in CSS sibling-count() function.

Related issues and pull requests

Fixes #40755

Related #40120

@ramiy ramiy requested a review from a team as a code owner August 21, 2025 13:43
@ramiy ramiy requested review from chrisdavidmills and removed request for a team August 21, 2025 13:43
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs size/s [PR only] 6-50 LoC changed labels Aug 21, 2025
Copy link
Contributor

github-actions bot commented Aug 21, 2025

Preview URLs

(comment last updated: 2025-08-22 14:20:49)

Copy link
Member

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You would need to fix the descriptions too, which still refer to this function as a child-counting algorithm.

@ramiy
Copy link
Contributor Author

ramiy commented Aug 21, 2025

I've reverted the description to the original description I use in my initial PR (#40120), based on the spec description.

@Josh-Cena tell me if you approve this change.

@ramiy ramiy requested a review from Josh-Cena August 22, 2025 13:16
@Josh-Cena Josh-Cena force-pushed the sibling-count-example branch from 226545e to a15a462 Compare August 22, 2025 14:12
Copy link
Member

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix! The spec uses language like "direct children of the parent", which is slightly less straightforward, and your modification still suggests "direct children of the element" which is incorrect, so I'm opting for the more straightforward (but maybe less precise) wording "siblings including itself".

@Josh-Cena Josh-Cena merged commit 9ccdb2d into mdn:main Aug 22, 2025
8 checks passed
@ramiy ramiy deleted the sibling-count-example branch August 22, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:CSS Cascading Style Sheets docs size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bad Sibling-Count Example
2 participants