CSS :indeterminate Pseudo-class

Definition and Usage

CSS :indeterminate The pseudo-class is used to select any form element in an indeterminate state.

This pseudo-class can only be used for the following elements:

  • The <input type="checkbox"> element. The indeterminate attribute must be set to true using JavaScript
  • The <input type="radio"> element when all radio buttons with the same name value in the form are not selected
  • The <progress> element in an indeterminate state

Example

Add a red shadow to the form elements that are indeterminate:

input:indeterminate {
  box-shadow: 0 0 5px 3px red;
{}

Try It Yourself

CSS Syntax

:indeterminate {
  css declarations;
{}

Technical Details

Version: CSS3

Browser Support

The numbers in the table specify the first browser version to fully support this pseudo-class.

Chrome Edge Firefox Safari Opera
39 79 51 10 26