Closed jonathantneal closed 2 years ago
I often think of :checked as exclusively having 2 states (boolean). Since CSS Toggles could be used to give meaning beyond 2 states (like checked, unchecked, & indeterminate), would you consider :toggled (or :toggle) as the pseudo-selector name?
:checked
:toggled
:toggle
.tristate-check { toggle: check 0/2; } .tristate-check:toggled(1) { /* "checked" styles */ } .tristate-check:toggled(2) { /* "indeterminate" styles */ }
.tristate-check { toggle: check 0/2; } .tristate-check:toggled(check 1) { /* "checked" styles */ } .tristate-check:toggled(check 2) { /* "indeterminate" styles */ }
I just updated the spec to use :toggle().
:toggle()
Keeping this open for any other naming suggestions, otherwise I'll stick with :toggle()
I often think of
:checked
as exclusively having 2 states (boolean). Since CSS Toggles could be used to give meaning beyond 2 states (like checked, unchecked, & indeterminate), would you consider:toggled
(or:toggle
) as the pseudo-selector name?