Re: [csswg-drafts] Add a property to retrieve plural instances of pseudo elements with the same selector (#12162)

The CSS Working Group just discussed `Add a property to retrieve plural instances of pseudo elements with the same selector`, and agreed to the following:

* `RESOLVED: add element.pseudoAll that returns a list of CSSPseudoElement`

<details><summary>The full IRC log of that discussion</summary>
&lt;kbabbitt> flackr: proposal is to extend what we have in CSS pseudo to allow retrieving the pseudo elements that have multiple instances<br>
&lt;kbabbitt> ... if a browser does implement CSS pseudos, this is probably a good thing to do because we have many pseudos that can be matched with generic selectors<br>
&lt;kbabbitt> ... I agree with the proposal that it should behave a lot like querySelectorAll<br>
&lt;Rossen4> q?<br>
&lt;Rossen4> ack lwarlow<br>
&lt;kbabbitt> TabAtkins: also agree with use case and proposed ordering behavior flackr suggested in the issue<br>
&lt;kbabbitt> seems reasonable to me as well<br>
&lt;kbabbitt> fantasai: 3 different proposals, which one?<br>
&lt;kbabbitt> flackr: element.pseudo is already in the css-pseudo-4 spec<br>
&lt;kbabbitt> ... proposal would be to add a method that gets all pseudos<br>
&lt;kbabbitt> ... first one I believe, something qSA-like<br>
&lt;kbabbitt> ... that returns all matching pseudos<br>
&lt;kbabbitt> TabAtkins: yes, the one listed under the Recommendation heading<br>
&lt;kbabbitt> flackr: open to bikeshedding<br>
&lt;kbabbitt> fantasai: okay with this<br>
&lt;kbabbitt> ... for element.pseudo would that return first?<br>
&lt;kbabbitt> flackr: yes<br>
&lt;kbabbitt> TabAtkins: yes, same as qS vs qSA<br>
&lt;kbabbitt> ... for bikeshedding purposes we should make it pseudoAll? not most grammatical but parallel naming is important<br>
&lt;kbabbitt> Rossen4: actualy it's not bad<br>
&lt;ydaniv> +1<br>
&lt;kbabbitt> flackr: seems reasonable<br>
&lt;JakeA> Also things like `matchAll` exist<br>
&lt;TabAtkins> true!<br>
&lt;kbabbitt> Rossen4: any other suggestions?<br>
&lt;kbabbitt> Rossen4: Proposal is to add element.pseudoAll that returns a list of nodes<br>
&lt;kbabbitt> Rossen4: objections?<br>
&lt;JakeA> List of `CSSPseudoElement`<br>
&lt;kbabbitt> flackr: yes, not list of nodes, list of CSSPseudoElement<br>
&lt;kbabbitt> RESOLVED: add element.pseudoAll that returns a list of CSSPseudoElement<br>
&lt;Rossen4> ack ntim<br>
&lt;kbabbitt> ntim: I think element.pseudo was resolved on different issue<br>
&lt;kbabbitt> Rossen4: if you feel we need to discuss more, bring up that other issue or open a new one<br>
&lt;flackr> +1 we'll keep the names in sync<br>
</details>


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


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

Received on Wednesday, 17 September 2025 16:24:33 UTC