Breaking token changes across multiple themes
Token change safety under multi-theme.
A change is safe if every theme still satisfies the token's contract and contrast; dangerous if it breaks one theme, like a value that fails contrast in high-contrast mode.
WHAT THIS TESTS Whether you understand that a semantic token carries a contract across every theme, so the blast radius of a change is multiplied by the number of themes.
A GOOD ANSWER COVERS Each semantic token resolves to a value per theme, and many carry implicit contracts such as a minimum contrast ratio against paired tokens. Multi-theme complicates breaking changes because a tweak that looks fine in the default light theme may violate the contract in dark or high-contrast. So safety must be evaluated per theme. A change is non-breaking if it preserves the token's meaning and passes accessibility checks in all themes. A change is breaking, even if it is just a value change, if it alters the contract or fails in any theme. Renaming or removing a token, or changing what a semantic token means, is breaking everywhere. Mitigate with automated contrast tests across all theme combinations in CI and visual regression per theme.
COMMON WRONG ANSWERS Validating a token only in the light theme and assuming the others follow. Treating value changes as always safe and only renames as breaking. Ignoring contrast contracts. Forgetting high-contrast mode entirely. Not running per-theme visual or a11y tests.
LIKELY FOLLOW-UPS How do you automate contrast checks across themes? Is a pure value change ever breaking? How do you version theme-specific changes? How do you add a new theme without breaking existing ones?
ONE CONCRETE EXAMPLE Safe: darkening color-text-secondary slightly in the light theme while it still passes contrast against its background in light, dark, and high-contrast. Dangerous: lightening color-background-surface to look softer in light mode; in high-contrast mode that same surface now fails the contrast ratio against text, breaking accessibility for users who depend on that theme even though the light theme looked perfect.
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.