Re: [csswg-drafts] [css-values-5] allow specifying flat vs light tree in `sibling-index()` and `sibling-count()` (#9562)

The CSS Working Group just discussed ``[css-values-5] allow specifying flat vs light tree in `sibling-index()` and `sibling-count()` ``, and agreed to the following:

* `RESOLVED: to have sibling-index() and sibling-count() to default to DOM tree`

<details><summary>The full IRC log of that discussion</summary>
&lt;ydaniv> emilio: this is about which tree do sibling-index and sibling-count work on<br>
&lt;ydaniv> ... right now using the flat tree which is weird default<br>
&lt;ydaniv> ... the right default would probably be the light tree<br>
&lt;ydaniv> ... a lot of work if there is now use-case<br>
&lt;bramus> q+<br>
&lt;ydaniv> ... could expose, but feel strongly default should be DOM tree<br>
&lt;futhark> q+<br>
&lt;astearns> ack bramus<br>
&lt;ydaniv> astearns:  this is only about using the DOM tree as default<br>
&lt;ydaniv> bramus: we initially mentioned that this would be whatever n-child is using<br>
&lt;astearns> ack futhark<br>
&lt;ydaniv> futhark: no strong opinion but nth-child already has issues<br>
&lt;ydaniv> ... if we add support selectors inside -index() that would enable it, otherwise there is a clear use-case for using DOM tree<br>
&lt;ydaniv> ... do think it could be said the same for nth-child<br>
&lt;ydaniv> ... there's also a proposal for children-count() and that would have a big difference<br>
&lt;emilio> q+<br>
&lt;ydaniv> ... because if you style the slot  ... if allowing flat tree<br>
&lt;astearns> ack emilio<br>
&lt;ydaniv> emilio: I think that makes sense, I think sibling and count &lt;missed><br>
&lt;ydaniv> ... I could come up with cases for both, we need a more holistic conversation how we expose these in all functions<br>
&lt;ydaniv> ... default should be DOM tree<br>
&lt;bramus> +1<br>
&lt;ydaniv> futhark: I agree<br>
&lt;ydaniv> ... impl.-wise not a big deal for us<br>
&lt;ydaniv> astearns: what if we resolve to change specs to default for DOM tree for sibling-index and -count<br>
&lt;emilio> s/&lt;missed>/sibling and child count for flat tree are a bit more complicated because there are two counts you care about, the one that includes slots and the "flattened" one/<br>
&lt;ydaniv> ... and keep this issue open for swapping for all of other counting functions<br>
&lt;ydaniv> PROPOSED: to have sibling-index() and sibling-count() to default to DOM tree<br>
&lt;ydaniv> RESOLVED: to have sibling-index() and sibling-count() to default to DOM tree<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9562#issuecomment-2824834068 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 23 April 2025 16:15:18 UTC