Custom property fallback
noun
say it: “KUS-tum PROP-er-tee FAWL-bak” /ˈkʌstəm ˈprɒpərti ˈfɔːlbæk/
The backup value written after the comma in var(), such as var(--accent, orange), used when the custom property hasn't been set.
What is a custom property fallback?
A fallback is the second value in var(), used when the custom property isn't set.
.alert { color: var(--alert-color, crimson); } /* crimson unless --alert-color is set */
In a sentence
- “Thanks to the custom property fallback, the badge was still orange on the page that never set --accent.”
Level: Freelancer · More CSS terms at this level
Updated