.badge { color: var(--badge-color, #1f2937); }If --badge-color does not exist, the text uses #1f2937.
LESSON 92 OF 100
Keep text readable when a local token is undefined.
The second var() argument is used when the requested custom property is missing or invalid at substitution time.
.badge { color: var(--badge-color, #1f2937); }If --badge-color does not exist, the text uses #1f2937.
.badge { color: var(--badge-color); }Without a fallback, the declaration can become invalid when the token is missing.
Set .badge colour to var(--badge-color, #1f2937).
The comma separates the requested token from the fallback used only when needed.
ANALYSIS REQUEST
The initial discussion is without obligation. You receive an honest recommendation, suitable stages and the factors that affect price.