Re: [csswg-drafts] [selectors] Pseudo-class to indicate when a slot has content (#6867)

The CSS Working Group just discussed `[selectors] Pseudo-class to indicate when a slot has content`, and agreed to the following:

* `RESOLVED: :has-slotted should use the flattened tree to resolve if content is slotted or not. We could later discuss a different pseudo-class for the other behavior.`

<details><summary>The full IRC log of that discussion</summary>
&lt;bramus> keithamus: last week we resolved to match when the fallback content is not being displayed<br>
&lt;bramus> … whoich means using non flat tree<br>
&lt;bramus> … think this is a mistake<br>
&lt;bramus> … some people form the WC community reached out<br>
&lt;lea> q?<br>
&lt;lea> q+<br>
&lt;bramus> … was maybe overindexing on maybe wehter the fallback tree is displayed or &lt;missed><br>
&lt;bramus> … would like to change the resolution to use the flattened tree<br>
&lt;astearns> ack lea<br>
&lt;bramus> lea: do we stay consistent with JS API or do we do a better thing? Both are valid. Proably should follow JS appraoch for consistency<br>
&lt;bramus> … am wondering if we can have two pseudo classes<br>
&lt;bramus> keithamus: JS api offer the optionality  through a flattened flag<br>
&lt;bramus> … has more to do with compat with ::slotted<br>
&lt;bramus> … cannot do slotted-slot<br>
&lt;bramus> … also composition<br>
&lt;bramus> … authors of components are more likely to want to know if th ething has been slotted.<br>
&lt;keithamus> s/fallback tree is displayed or &lt;missed>/fallback content is displayed vs the flattened slots/<br>
&lt;bramus> … if that is many layers deep seems irrelevant to them<br>
&lt;bramus> lea: agree<br>
&lt;bramus> keithamus: proposed resolution is to use the flattened tree<br>
&lt;bramus> … to create  new selector that uses non-flat tree I have no opinion<br>
&lt;lea> q?<br>
&lt;bramus> … polyfills: wont affect us because JS has optionality for both<br>
&lt;bramus> lea: I understand the sentiment that we need to ship this ASAP. really needed<br>
&lt;bramus> keithamus: I have i2s for chrome and I believe we are working towards one for firefox as well<br>
&lt;lea> s/I understand the sentiment /I completely agree with the sentiment /<br>
&lt;bramus> … need to resolve on this<br>
&lt;keithamus> PROPOSED RESOLUTION: :has-slotted should use the flattened tree to resolve if content is slotted or not.<br>
&lt;lea> +1<br>
&lt;bramus> astearns: with a future issue on adding a param or new pseudo to not use the flat tree<br>
&lt;bramus> … that’s a different, later, discussion<br>
&lt;bramus> keithamus: sgtm<br>
&lt;bramus> chrishtr: do we need resived resolution?<br>
&lt;bramus> astearns: no, wanted to point out other issue is out of scope<br>
&lt;lea> PROPOSED RESOLUTION: :has-slotted should use the flattened tree to resolve if content is slotted or not. We could later discuss a different pseudo-class for the other behavior.<br>
&lt;bramus> chrishtr: so someone should raise a new issue<br>
&lt;bramus> keithamus: i'll try and do that tomorrow<br>
&lt;keithamus> RESOLVED: :has-slotted should use the flattened tree to resolve if content is slotted or not. We could later discuss a different pseudo-class for the other behavior.<br>
&lt;bramus> keithamus: thanks everyone for your time<br>
</details>


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


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

Received on Wednesday, 15 January 2025 17:26:49 UTC