[csswg-drafts] [css-forms-1] The styles for checkbox/radio seem like they need to use :checked? (#11894)

mfreed7 has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-forms-1] The styles for checkbox/radio seem like they need to use :checked? ==
The proposed styles for checkbox/radio would seem to always show checkmarks/dots:

```css
input[type=checkbox]:not([switch])::checkmark {
    content: '\2713' / '';
}

input[type=radio]::checkmark {
    content: '';
    background-color: currentColor;
    display: inline-block;
    border-radius: 100%;
    height: 100%;
    width: 100%;
}
```

I think there needs to be a rule similar to `<select>`, or perhaps that one can just be made more general?

```css
:not(:checked)::checkmark {
  visibility: hidden;
}
```


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11894 using your GitHub account


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

Received on Monday, 10 March 2025 18:12:05 UTC