Re: [csswg-drafts] [selectors] Declarative custom `:state()` states (#12502)

I still need to find the time to re-read the updated proposal, but I’ve become less concerned about the “state” naming and I agree that having one API makes sense.

**Some more use cases**

- I also have frequently found cases where as a custom element author, I want to set a custom state on a shadow part (e.g. `some-element::part(part):state(part-state)`) rather than making that shadow part a custom element with its own internals to do so.
- I would also love to set state on a `::slotted()` element.

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


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

Received on Monday, 20 July 2026 03:48:49 UTC