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

For future-proofing, maybe something like:

```css
@whatever checkbox {
 matches: selector(input[type="checkbox"]:not([switch]));
}
```

A `selector()` seems more future-proof to me in case other ways of matching are invented. (And also because selectors use `:` which could be problematic for parsing otherwise, I can't remember if that's the case or not.)

And using a block-rule with a descriptor is also more future-proof in case there are other ways of affecting how the custom matching works. Though if there aren't any conceivable ways you'd want to do that, then not having it is fine.

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


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

Received on Tuesday, 22 July 2025 11:11:21 UTC