Closed adamwathan closed 4 years ago
Okay so I pulled down this branch to test. It does work fine with the pseudo-selector if you use JS to set indeterminate, but it does NOT work if you use the HTML attribute. I think setting it via JS is much more likely (for use as a bulk selection input).
I think the MDN docs were slightly misleading as further down the page there is this snippet:
This is set using the HTMLInputElement object's indeterminate property via JavaScript (it cannot be set using an HTML attribute)
So it appears that the pseudo-selector is the right way to go and we should not worry about the HTML attribute version.
This PR adds default styles for indeterminate checkboxes using the
:indeterminate
selector, which can be triggered by settingelement.indeterminate = true
on the actual checkbox node using JavaScript.Implementing this in a sensible way requires a breaking change that no longer lets you set the
icon
oriconColor
for checkboxes/radios directly under the rootcheckbox
orradio
key. You always have to set it under&:checked
now.Customizing the indeterminate icon stuff is done the same way as with
:checked
: