Re: [csswg-drafts] How to handle addEventListener on `CSSPseudoElement`? (#12163)

> [@keithamus](https://github.com/keithamus)
> 
> * about other approaches: what do you think about [[css-pseudo-4] Proxying pseudo-elements as "real" (`<slot>`) elements #12575](https://github.com/w3c/csswg-drafts/issues/12575)? And what other approaches do you have in mind?

I think this approach seems quite reasonable. It doesn't add much "new", it "explains" the platform to a developer. OTOH HTML has the flexibility to mint new elements, so I don't necessarily see why `<slot name=::backdrop>` is any better than simply `<backdrop>`.

> * about multiple pseudos on the same element: for e.g. `::column` we might add an `index` property to CSSPseudoElement.

Why not `::column(index)`? My personal belief/desire is that each pseudo element should be represented by a discrete selector. Functional pseudo element selectors can provide that.

-- 
GitHub Notification of comment by keithamus
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12163#issuecomment-3175770246 using your GitHub account


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

Received on Monday, 11 August 2025 16:25:57 UTC