HTML & CSS · Senior · Question 71 of 75

Why split design tokens into primitive and semantic layers?

--blue-600: oklch(0.55 0.2 260);      /* primitive */
--color-action: var(--blue-600);      /* semantic */

Explanation

Dark mode or a new brand only remaps --color-action. Components referencing --blue-600 directly would all need edits.

Further reading

Problem with a question

HTML & CSS · Senior · question 71

Test yourself

Take the HTML & CSS · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz