The :indeterminate
CSS pseudo-class represents any form element whose state is indeterminate, such as checkboxes which have their HTML indeterminate
attribute set to true
, radio buttons which are members of a group in which all radio buttons are unchecked, and indeterminate <progress>
elements.
/* Selects any <input> whose state is indeterminate */ input:indeterminate { background: lime; }
Elements targeted by this selector are:
-
<input type="checkbox">
elements whoseindeterminate
property is set totrue
by JavaScript -
<input type="radio">
elements, when all radio buttons with the samename
value in the form are unchecked -
<progress>
elements in an indeterminate state