- From: BlueMöhre via GitHub <sysbot+gh@w3.org>
- Date: Thu, 15 Aug 2024 14:14:13 +0000
- To: public-css-archive@w3.org
bluemoehre has just created a new issue for https://github.com/w3c/csswg-drafts: == [selectors] Shouldn't there be a pseudo selector for `:unchecked` inputs? == Currently the `:checked` and `:indeterminate` pseudo-classes can apply to a `<input type="checkbox" />`: https://drafts.csswg.org/selectors/#checked https://drafts.csswg.org/selectors/#indeterminate But to apply styles for an *unchecked* checkbox, you must use `:not(:checked)`. Regarding other selectors there is always a negative variant: https://drafts.csswg.org/selectors/#enabled-pseudo https://drafts.csswg.org/selectors/#disabled-pseudo https://drafts.csswg.org/selectors/#required-pseudo https://drafts.csswg.org/selectors/#optional-pseudo https://drafts.csswg.org/selectors/#valid-pseudo https://drafts.csswg.org/selectors/#invalid-pseudo https://drafts.csswg.org/selectors/#user-valid-pseudo https://drafts.csswg.org/selectors/#user-invalid-pseudo [...] Having very specific design rules, it feels a bit off and somehow degrades readability: ```css input:enabled:checked { ... } input:enabled:checked:hover { ... } input:enabled:not:(checked) { ... } input:disabled:checked { ... } input:disabled:not(:checked) { ... } ``` **So for convenience: why don't we have an `:unchecked` ?** Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10746 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 15 August 2024 14:14:13 UTC