A defined but unusable value does not trigger the var() fallback
.ok { color: var(--brand, red); }
.missing { color: var(--undefined, #0B5853); }
.wrong { --oops: 8px; color: var(--oops, #0B5853); }The first rule can use --brand. The second uses the fallback because the name is missing. The third keeps 8px as the substitution, so the #0B5853 fallback is not a rescue.
- This checker confirms the declared var() forms. It does not compute the cascaded color, so the IACVT outcome is explained in the text rather than treated as a measured pixel color.
<p class="ok">Defined variable</p>
<p class="missing">Missing variable</p>
<p class="wrong">Defined length used as a color</p>
<style>
:root { --brand: #0B5853; }
.ok, .missing, .wrong { font-family: sans-serif; }
.ok { color: var(--brand, red); }
.missing { color: var(--undefined, #0B5853); }
.wrong { --oops: 8px; color: var(--oops, #0B5853); }
</style>What this markup means
On :root, --brand is a color, so var(--brand, red) substitutes #0B5853 and the red fallback is unused. var(--undefined, #0B5853) has no such custom property, so the fallback is used. --oops is defined as 8px; color: var(--oops, #0B5853) therefore becomes color: 8px. The fallback is skipped because the variable exists. The color declaration is then invalid at computed-value time and does not snap to #0B5853 via var().