CKTIS / CSS
:indeterminate — indeterminate-state pseudo-class
The :indeterminate pseudo-class matches controls in an indeterminate state: appropriately configured checkboxes, radio buttons in a group with no selection, and progress elements without a value attribute. It does not simply mean “unchecked”.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
:indeterminate:indeterminate is a state pseudo-class, not a pseudo-element. It styles an existing control whose state is indeterminate. Writing input:indeterminate restricts matching to input elements; :indeterminate alone also includes matching progress elements.
The HTML Standard defines three cases: a checkbox input whose indeterminate property is true and that has no switch attribute; each radio button whose group contains no checked button; and a progress element without a value attribute. For a radio group, all its buttons match, not just one. A progress element with value="0" already has a determinate value and does not match.
A browser that does not support the switch attribute may ignore it. In that case, a checkbox with the attribute can still match :indeterminate if its indeterminate property is true.
For a checkbox, set indeterminate through JavaScript. This property is independent of checked: setting it alone does not change checkedness. Therefore, do not equate :indeterminate with “unchecked” or with :not(:checked). CSS selects the state but does not set it.
The example records the matching elements, then clears the checkbox's indeterminate state, checks one radio button, and sets progress to zero. The second list is empty. The example does not use the switch attribute or test that exception. The expected result concerns text, not native control appearance; the example still requires local verification in the target browser.
Examples
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>:indeterminate demo</title>
<style>
:indeterminate { outline: 3px solid #b45309; outline-offset: 3px; }
</style>
<label><input id="box" type="checkbox"> Mixed selection</label>
<fieldset>
<legend>Choose one</legend>
<label><input id="a" type="radio" name="choice"> A</label>
<label><input id="b" type="radio" name="choice"> B</label>
</fieldset>
<label>Progress <progress id="task"></progress></label>
<pre id="result"></pre>
<script>
const box = document.getElementById('box');
const a = document.getElementById('a');
const task = document.getElementById('task');
const result = document.getElementById('result');
const matches = () => Array.from(
document.querySelectorAll(':indeterminate'), element => element.id
).join(', ') || '(none)';
box.indeterminate = true;
const before = matches();
box.indeterminate = false;
a.checked = true;
task.value = 0;
result.textContent = before + '\n' + matches();
</script>
</html>Result
box, a, b, task (none)
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.