{"id":53,"date":"2025-10-03T17:31:16","date_gmt":"2025-10-03T15:31:16","guid":{"rendered":"https:\/\/marshfire.net\/wp\/?p=53"},"modified":"2025-10-11T13:57:19","modified_gmt":"2025-10-11T11:57:19","slug":"css-variables-as-design-tokens-your-frontends-best-friend-and-why-youll-wonder-how-you-lived-without-them","status":"publish","type":"post","link":"https:\/\/marshfire.net\/wp\/software-architecture\/53\/","title":{"rendered":"CSS Variables as Design Tokens: Your Frontend\u2019s Best Friend (And Why You\u2019ll Wonder How You Lived Without Them)"},"content":{"rendered":"\n<p><a href=\"https:\/\/medium.com\/@marshfire?source=post_page---byline--5cbc68dd6de8---------------------------------------\"><\/a><em>Or: How I Learned to Stop Worrying and Love Consistent Design<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/marshfire.net\/wp\/wp-content\/uploads\/2025\/10\/image-1024x683.png\" alt=\"\" class=\"wp-image-54\" style=\"width:1200px;height:auto\" srcset=\"https:\/\/marshfire.net\/wp\/wp-content\/uploads\/2025\/10\/image-1024x683.png 1024w, https:\/\/marshfire.net\/wp\/wp-content\/uploads\/2025\/10\/image-300x200.png 300w, https:\/\/marshfire.net\/wp\/wp-content\/uploads\/2025\/10\/image-768x512.png 768w, https:\/\/marshfire.net\/wp\/wp-content\/uploads\/2025\/10\/image.png 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p id=\"86cb\">If you\u2019ve ever found yourself hunting through 47 different CSS files trying to figure out why that button is `<code>#3B82F6<\/code>` while everything else is `<code>#2563EB<\/code>`, or if you\u2019ve ever had a designer ask you to \u201cjust make everything a bit more blue\u201d and felt your soul leave your body\u2026 this post is for you.<\/p>\n\n\n\n<p id=\"3f16\">Welcome to the wonderful world of CSS variables as design tokens \u2014 where consistency isn\u2019t just a dream, and changing your entire color scheme doesn\u2019t require a weekend and three energy drinks.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"b2ae\"><strong>What Are CSS Variables, Really? (The \u201cI Promise This Isn\u2019t Scary\u201d Introduction)<\/strong><\/h3>\n\n\n\n<p id=\"3e1e\">CSS variables, officially called Custom Properties (because the CSS Working Group loves their formal names), are like variables in any programming language, but they live in your stylesheets. Think of them as little containers that hold values you can reuse throughout your CSS.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>:root {\n  --primary-color: #2563EB;\n  --spacing-large: 24px;\n  --border-radius: 8px;\n}\n\n.button {\n  background-color: var(--primary-color);\n  padding: var(--spacing-large);\n  border-radius: var(--border-radius);\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #8FBCBB\">root<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --primary-color<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">#<\/span><span style=\"color: #B48EAD\">2563EB<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --spacing-large<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">24<\/span><span style=\"color: #81A1C1\">px;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --border-radius<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">8<\/span><span style=\"color: #81A1C1\">px;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #8FBCBB\">button<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #D8DEE9\">background-color<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--primary-color<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #D8DEE9\">padding<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--spacing-large<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #D8DEE9\">border-radius<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--border-radius<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p id=\"865d\">Simple, right? But here\u2019s where it gets interesting \u2014 and where design tokens come into play.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"9012\"><strong>Design Tokens: The Rosetta Stone of Design Systems<\/strong><\/h3>\n\n\n\n<p id=\"5be7\">Design tokens are the atomic building blocks of your design system. They\u2019re named entities that store visual design attributes \u2014 colors, spacing, typography, shadows, you name it. Think of them as the single source of truth that bridges the gap between design and development.<\/p>\n\n\n\n<p id=\"4960\">But here\u2019s the thing: design tokens aren\u2019t tied to any specific technology. They\u2019re abstract concepts that can be implemented in CSS variables, Sass variables, JavaScript objects, or even that sticky note on your monitor (though I wouldn\u2019t recommend the last one for production).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"d11b\"><strong>The Magic Happens When They Meet<\/strong><\/h3>\n\n\n\n<p id=\"e3a1\">When you combine CSS variables with the design token philosophy, something beautiful happens. You get:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Consistency<\/strong>&nbsp;(no more rogue colors hiding in your codebase)<\/li>\n\n\n\n<li><strong>Maintainability<\/strong>&nbsp;(change once, update everywhere)<\/li>\n\n\n\n<li><strong>Scalability<\/strong>&nbsp;(your design system grows with you, not against you)<\/li>\n\n\n\n<li><strong>Framework Independence<\/strong>&nbsp;(works with Angular, React, Vue, Vanilla JS, or whatever the cool kids are using next week)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"af39\"><strong>The Anatomy of Good Design Tokens<\/strong><\/h3>\n\n\n\n<p id=\"625a\">Let\u2019s talk about semantic naming, because this is where many developers go astray. You might be tempted to name your tokens like this:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>\/* \ud83d\ude22 Don't do this *\/\n:root {\n  --blue-500: #2563EB;\n  --gray-300: #D1D5DB;\n  --size-16: 16px;\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #616E88\">\/* \ud83d\ude22 Don&#39;t do this *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #8FBCBB\">root<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --blue-500<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">#<\/span><span style=\"color: #B48EAD\">2563EB<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --gray-300<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">#<\/span><span style=\"color: #B48EAD\">D1D5DB<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --size-16<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">16<\/span><span style=\"color: #81A1C1\">px;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p id=\"10b6\">But what happens when your \u201cblue\u201d needs to become purple? Or when your design system evolves? You end up with purple buttons using <code>`\u2014blue-500`<\/code>, which is about as helpful as a chocolate teapot.<\/p>\n\n\n\n<p id=\"3e74\">Instead, embrace semantic naming:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>\/* \ud83c\udf89 Much better! *\/\n:root {\n  --color-primary: #2563EB;\n  --color-surface: #D1D5DB;\n  --space-md: 16px;\n  \n  \/* Even better - be specific about usage *\/\n  --button-background-primary: var(--color-primary);\n  --card-background: var(--color-surface);\n  --content-padding: var(--space-md);\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #616E88\">\/* \ud83c\udf89 Much better! *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #8FBCBB\">root<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --color-primary<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">#<\/span><span style=\"color: #B48EAD\">2563EB<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --color-surface<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">#<\/span><span style=\"color: #B48EAD\">D1D5DB<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --space-md<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">16<\/span><span style=\"color: #81A1C1\">px;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #616E88\">\/* Even better - be specific about usage *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --button-background-primary<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--color-primary<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --card-background<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--color-surface<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --content-padding<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--space-md<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"7db1\"><strong>Building a Component-First Token System<\/strong><\/h3>\n\n\n\n<p id=\"54fe\">Here\u2019s where the rubber meets the road. Let\u2019s build a button component that uses design tokens effectively:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>:root {\n  \/* Base tokens - your design system's vocabulary *\/\n  --color-blue-600: #2563EB;\n  --color-blue-700: #1D4ED8;\n  --color-white: #FFFFFF;\n  --space-xs: 8px;\n  --space-sm: 12px;\n  --space-md: 16px;\n  --radius-md: 6px;\n  --font-weight-medium: 500;\n  \n  \/* Semantic tokens - what things mean *\/\n  --color-action-primary: var(--color-blue-600);\n  --color-action-primary-hover: var(--color-blue-700);\n  --color-text-on-primary: var(--color-white);\n  \n  \/* Component tokens - how components behave *\/\n  --button-padding-x: var(--space-md);\n  --button-padding-y: var(--space-sm);\n  --button-border-radius: var(--radius-md);\n  --button-font-weight: var(--font-weight-medium);\n  \n  \/* Button-specific semantic tokens *\/\n  --button-primary-background: var(--color-action-primary);\n  --button-primary-background-hover: var(--color-action-primary-hover);\n  --button-primary-text: var(--color-text-on-primary);\n}\n\n.button {\n  padding: var(--button-padding-y) var(--button-padding-x);\n  border-radius: var(--button-border-radius);\n  font-weight: var(--button-font-weight);\n  border: none;\n  cursor: pointer;\n  transition: background-color 200ms ease;\n}\n\n.button--primary {\n  background-color: var(--button-primary-background);\n  color: var(--button-primary-text);\n}\n\n.button--primary:hover {\n  background-color: var(--button-primary-background-hover);\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #8FBCBB\">root<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #616E88\">\/* Base tokens - your design system&#39;s vocabulary *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --color-blue-600<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">#<\/span><span style=\"color: #B48EAD\">2563EB<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --color-blue-700<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">#<\/span><span style=\"color: #B48EAD\">1D4ED8<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --color-white<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">#<\/span><span style=\"color: #B48EAD\">FFFFFF<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --space-xs<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">8<\/span><span style=\"color: #81A1C1\">px;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --space-sm<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">12<\/span><span style=\"color: #81A1C1\">px;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --space-md<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">16<\/span><span style=\"color: #81A1C1\">px;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --radius-md<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">6<\/span><span style=\"color: #81A1C1\">px;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --font-weight-medium<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">500<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #616E88\">\/* Semantic tokens - what things mean *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --color-action-primary<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--color-blue-600<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --color-action-primary-hover<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--color-blue-700<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --color-text-on-primary<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--color-white<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #616E88\">\/* Component tokens - how components behave *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --button-padding-x<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--space-md<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --button-padding-y<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--space-sm<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --button-border-radius<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--radius-md<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --button-font-weight<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--font-weight-medium<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #616E88\">\/* Button-specific semantic tokens *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --button-primary-background<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--color-action-primary<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --button-primary-background-hover<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--color-action-primary-hover<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --button-primary-text<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--color-text-on-primary<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #8FBCBB\">button<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #D8DEE9\">padding<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--button-padding-y<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #88C0D0\"> var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--button-padding-x<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #D8DEE9\">border-radius<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--button-border-radius<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #D8DEE9\">font-weight<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--button-font-weight<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #D8DEE9\">border<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">none;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #81A1C1\">cursor<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">pointer;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #D8DEE9\">transition<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">background-color<\/span><span style=\"color: #88C0D0\"> <\/span><span style=\"color: #B48EAD\">200<\/span><span style=\"color: #81A1C1\">ms<\/span><span style=\"color: #88C0D0\"> <\/span><span style=\"color: #81A1C1\">ease;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #8FBCBB\">button--primary<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #D8DEE9\">background-color<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--button-primary-background<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #D8DEE9\">color<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--button-primary-text<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #8FBCBB\">button--primary<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #8FBCBB\">hover<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #D8DEE9\">background-color<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--button-primary-background-hover<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"a1e4\"><strong>The Hierarchy That Makes Sense<\/strong><\/h3>\n\n\n\n<p id=\"f2cb\">Notice the three-tier approach:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Base tokens<\/strong>&nbsp;(<code>`\u2014color-blue-600`<\/code>) \u2014 Raw values, your design system\u2019s atoms<\/li>\n\n\n\n<li><strong>Semantic tokens<\/strong>&nbsp;(<code>`\u2014color-action-primary`<\/code>) \u2014 What things mean in your interface<\/li>\n\n\n\n<li><strong>Component tokens<\/strong>&nbsp;(<code>`\u2014button-primary-background`<\/code>) \u2014 How specific components use semantic tokens<\/li>\n<\/ol>\n\n\n\n<p id=\"ea5b\">This hierarchy gives you incredible flexibility. Want to rebrand from blue to purple? Change the base token. Want to make all primary actions green for St. Patrick\u2019s Day? Update the semantic token. Want to make buttons specifically use a different color while keeping other primary actions the same? Override the component token.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ae03\"><strong>Theming: Where CSS Variables Really Shine<\/strong><\/h3>\n\n\n\n<p id=\"6dfb\">Here\u2019s where CSS variables leave Sass in the dust \u2014 runtime theming. With Sass variables, you\u2019re stuck with whatever was compiled. With CSS variables, you can change themes on the fly:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>\/* Light theme (default) *\/\n:root {\n  --surface-primary: #FFFFFF;\n  --surface-secondary: #F8FAFC;\n  --text-primary: #1F2937;\n  --text-secondary: #6B7280;\n}\n\n\/* Dark theme *\/\n&#91;data-theme=\"dark\"&#93; {\n  --surface-primary: #1F2937;\n  --surface-secondary: #111827;\n  --text-primary: #F9FAFB;\n  --text-secondary: #D1D5DB;\n}\n\n\/* High contrast theme *\/\n&#91;data-theme=\"high-contrast\"&#93; {\n  --surface-primary: #FFFFFF;\n  --surface-secondary: #F3F4F6;\n  --text-primary: #000000;\n  --text-secondary: #374151;\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #616E88\">\/* Light theme (default) *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #8FBCBB\">root<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --surface-primary<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">#<\/span><span style=\"color: #B48EAD\">FFFFFF<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --surface-secondary<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">#<\/span><span style=\"color: #B48EAD\">F8FAFC<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --text-primary<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">#<\/span><span style=\"color: #B48EAD\">1F2937<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --text-secondary<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">#<\/span><span style=\"color: #B48EAD\">6B7280<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #616E88\">\/* Dark theme *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #8FBCBB\">data-theme<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">dark<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">&#93;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --surface-primary<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">#<\/span><span style=\"color: #B48EAD\">1F2937<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --surface-secondary<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">#<\/span><span style=\"color: #B48EAD\">111827<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --text-primary<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">#<\/span><span style=\"color: #B48EAD\">F9FAFB<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --text-secondary<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">#<\/span><span style=\"color: #B48EAD\">D1D5DB<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #616E88\">\/* High contrast theme *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">&#91;<\/span><span style=\"color: #8FBCBB\">data-theme<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">high-contrast<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">&#93;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --surface-primary<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">#<\/span><span style=\"color: #B48EAD\">FFFFFF<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --surface-secondary<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">#<\/span><span style=\"color: #B48EAD\">F3F4F6<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --text-primary<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">#<\/span><span style=\"color: #B48EAD\">000000<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --text-secondary<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">#<\/span><span style=\"color: #B48EAD\">374151<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Switch themes with a simple JavaScript one-liner:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>document.documentElement.setAttribute('data-theme', 'dark');<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">document<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">documentElement<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">setAttribute<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">data-theme<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">dark<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p id=\"cd91\">No rebuilding, no compilation, no fuss. Just smooth, instant theme switching that would make a magician jealous.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"740d\"><strong>Framework Independence: The Ultimate Superpower<\/strong><\/h3>\n\n\n\n<p id=\"116b\">Here\u2019s the beautiful thing about CSS variables as design tokens \u2014 they don\u2019t care about your JavaScript framework. React component? Vue template? Vanilla HTML? They all speak CSS, so they all speak design tokens.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&lt;!-- Works in any framework (or no framework) -->\n&lt;button class=\"button button--primary\">Click me!&lt;\/button><\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #616E88\">&lt;!-- Works in any framework (or no framework) --&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">&lt;button<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">class<\/span><span style=\"color: #ECEFF4\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">button button--primary<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #81A1C1\">&gt;<\/span><span style=\"color: #D8DEE9FF\">Click me!<\/span><span style=\"color: #81A1C1\">&lt;\/button&gt;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p id=\"01f6\">This means your design system can outlive framework trends. When React 25 comes out with mind-reading components (okay, maybe not), your design tokens will still work perfectly.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"88e2\"><strong>The Maintenance Revolution<\/strong><\/h3>\n\n\n\n<p id=\"13d9\">Let\u2019s paint a picture. Your designer comes to you and says, \u201cWe need to adjust the spacing throughout the entire app \u2014 everything should be 20% tighter.\u201d<\/p>\n\n\n\n<p id=\"30de\"><strong>Before design tokens:&nbsp;<\/strong>You spend three days hunting through files, using find-and-replace on magic numbers, probably break something, definitely miss a few instances, and question your career choices.<\/p>\n\n\n\n<p id=\"ed7d\"><strong>With design tokens:<\/strong>&nbsp;You adjust a few base spacing tokens, grab a coffee, and watch the entire app update consistently. You finish early and use the extra time to finally organize your desk drawer.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"6ca4\"><strong>Advanced Patterns: Getting Fancy<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"f8d5\"><strong><em>Responsive Design Tokens<\/em><\/strong><\/h4>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>:root {\n  --space-lg: 24px;\n  --button-padding: var(--space-lg);\n}\n\n@media (max-width: 768px) {\n  :root {\n    --space-lg: 16px;\n    \/* button-padding automatically adjusts! *\/\n  }\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #8FBCBB\">root<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --space-lg<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">24<\/span><span style=\"color: #81A1C1\">px;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --button-padding<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--space-lg<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D08770\">@media<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #D8DEE9\">max-width<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">768<\/span><span style=\"color: #81A1C1\">px<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #8FBCBB\">root<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    --space-lg<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">16<\/span><span style=\"color: #81A1C1\">px;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #616E88\">\/* button-padding automatically adjusts! *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><strong><em>Contextual Tokens<\/em><\/strong><\/h4>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>.card {\n  --local-surface: var(--surface-secondary);\n  --local-text: var(--text-primary);\n  \n  background: var(--local-surface);\n  color: var(--local-text);\n}\n\n.card--highlighted {\n  --local-surface: var(--color-accent);\n  --local-text: var(--text-on-accent);\n  \/* Everything updates automatically *\/\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #8FBCBB\">card<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --local-surface<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--surface-secondary<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --local-text<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--text-primary<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #D8DEE9\">background<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--local-surface<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #D8DEE9\">color<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--local-text<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #8FBCBB\">card--highlighted<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --local-surface<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--color-accent<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --local-text<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--text-on-accent<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #616E88\">\/* Everything updates automatically *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><strong><em>Design Token Documentation<\/em><\/strong><\/h4>\n\n\n\n<p>Pro tip: Document your tokens right in your CSS:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>:root {\n  \/* Primary brand color - used for main actions, links, and focus states *\/\n  --color-primary: #2563EB;\n  \n  \/* Surface colors - backgrounds for cards, modals, and containers *\/\n  --surface-primary: #FFFFFF;\n  --surface-secondary: #F8FAFC;\n  \n  \/* Spacing scale - based on 8px grid system *\/\n  --space-xs: 8px;   \/* For tight layouts, icon padding *\/\n  --space-sm: 12px;  \/* Button padding, small gaps *\/\n  --space-md: 16px;  \/* Default content padding *\/\n  --space-lg: 24px;  \/* Section spacing, large gaps *\/\n  --space-xl: 32px;  \/* Major layout divisions *\/\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #8FBCBB\">root<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #616E88\">\/* Primary brand color - used for main actions, links, and focus states *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --color-primary<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">#<\/span><span style=\"color: #B48EAD\">2563EB<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #616E88\">\/* Surface colors - backgrounds for cards, modals, and containers *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --surface-primary<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">#<\/span><span style=\"color: #B48EAD\">FFFFFF<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --surface-secondary<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">#<\/span><span style=\"color: #B48EAD\">F8FAFC<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #616E88\">\/* Spacing scale - based on 8px grid system *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --space-xs<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">8<\/span><span style=\"color: #81A1C1\">px;<\/span><span style=\"color: #D8DEE9FF\">   <\/span><span style=\"color: #616E88\">\/* For tight layouts, icon padding *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --space-sm<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">12<\/span><span style=\"color: #81A1C1\">px;<\/span><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #616E88\">\/* Button padding, small gaps *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --space-md<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">16<\/span><span style=\"color: #81A1C1\">px;<\/span><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #616E88\">\/* Default content padding *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --space-lg<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">24<\/span><span style=\"color: #81A1C1\">px;<\/span><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #616E88\">\/* Section spacing, large gaps *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  --space-xl<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">32<\/span><span style=\"color: #81A1C1\">px;<\/span><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #616E88\">\/* Major layout divisions *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ee92\"><strong>Common Pitfalls (And How to Avoid Them)<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"8bea\"><strong><em>The \u201cEverything Is a Token\u201d Trap<\/em><\/strong><\/h4>\n\n\n\n<p id=\"f19d\">Not everything needs to be a design token. That 2px border on your specific loading spinner? Probably doesn\u2019t need to be <code>`\u2014loading-spinner-border-width`<\/code>. Keep it simple.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"8697\"><strong><em>The \u201cGeneric Token\u201d Problem<\/em><\/strong><\/h4>\n\n\n\n<p id=\"fc5a\">Avoid tokens like <code>`\u2014color-1`<\/code> or <code>`\u2014size-medium`<\/code>. Future you will have no idea what they\u2019re for, and current you will forget by next Tuesday.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"58ac\"><strong><em>The \u201cFramework Lock-in\u201d Mistake<\/em><\/strong><\/h4>\n\n\n\n<p id=\"7ff9\">Don\u2019t create tokens that are too specific to your current framework. <code>`\u2014react-component-margin`<\/code> isn\u2019t going to age well.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"e376\"><strong>The Developer Experience Revolution<\/strong><\/h3>\n\n\n\n<p id=\"05f3\">Here\u2019s what happens when you embrace CSS variables as design tokens:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Onboarding new developers becomes easier<\/strong>&nbsp;\u2014 they can understand your design system by reading the token names<\/li>\n\n\n\n<li><strong>Design-development handoff gets smoother<\/strong>&nbsp;\u2014 designers can speak in terms of tokens instead of pixel values<\/li>\n\n\n\n<li><strong>Debugging becomes less painful<\/strong>&nbsp;\u2014 you can see exactly which token is being used in dev tools<\/li>\n\n\n\n<li><strong>Consistency happens automatically<\/strong>&nbsp;\u2014 it becomes harder to accidentally use the wrong value<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"6155\"><strong>Tools and Workflow Integration<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"ee60\"><strong><em>Browser DevTools<\/em><\/strong><\/h4>\n\n\n\n<p id=\"fdc8\">Modern browser dev tools show you exactly which CSS variables are being used where. No more hunting for that mysterious `#3B82F6`.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"ef48\"><strong><em>Design Tool Integration<\/em><\/strong><\/h4>\n\n\n\n<p id=\"da1e\">Tools like Figma can export design tokens directly, and tools like Style Dictionary can transform them into CSS variables automatically.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"4329\"><strong><em>Documentation<\/em><\/strong><\/h4>\n\n\n\n<p id=\"0e65\">Your design tokens become self-documenting when named well:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>\/* This tells a story *\/\n.notification--success {\n  background: var(--notification-success-background);\n  color: var(--notification-success-text);\n  border: 1px solid var(--notification-success-border);\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #616E88\">\/* This tells a story *\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #8FBCBB\">notification--success<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #D8DEE9\">background<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--notification-success-background<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #D8DEE9\">color<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--notification-success-text<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #D8DEE9\">border<\/span><span style=\"color: #ECEFF4\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">1<\/span><span style=\"color: #81A1C1\">px<\/span><span style=\"color: #88C0D0\"> <\/span><span style=\"color: #81A1C1\">solid<\/span><span style=\"color: #88C0D0\"> var<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">--notification-success-border<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4b41\"><strong>The Future Is Token-Driven<\/strong><\/h3>\n\n\n\n<p id=\"f8ed\">CSS variables as design tokens aren\u2019t just a nice-to-have \u2014 they\u2019re becoming essential as web development matures. They provide:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Consistency at scale<\/strong><\/li>\n\n\n\n<li><strong>Maintainability that doesn\u2019t decrease over time<\/strong><\/li>\n\n\n\n<li><strong>Framework independence<\/strong><\/li>\n\n\n\n<li><strong>Runtime flexibility<\/strong><\/li>\n\n\n\n<li><strong>Better developer experience<\/strong><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"bce0\"><strong>Getting Started: Your First Steps<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Audit your existing CSS<\/strong>&nbsp;\u2014 find the repeated values<\/li>\n\n\n\n<li><strong>Start with colors and spacing<\/strong>&nbsp;\u2014 they\u2019re the easiest wins<\/li>\n\n\n\n<li><strong>Use semantic naming<\/strong>&nbsp;\u2014 think about meaning, not appearance<\/li>\n\n\n\n<li><strong>Build in layers<\/strong>&nbsp;\u2014 base, semantic, component<\/li>\n\n\n\n<li><strong>Document as you go<\/strong>&nbsp;\u2014 your future self will thank you<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"91db\"><strong>Conclusion: Embrace the Token Life<\/strong><\/h3>\n\n\n\n<p id=\"ab47\">CSS variables as design tokens aren\u2019t just a technical solution \u2014 they\u2019re a mindset shift toward more maintainable, scalable, and joyful frontend development. They bridge the gap between design and development, making both disciplines more effective.<\/p>\n\n\n\n<p id=\"1e94\">Sure, it takes a bit of upfront thinking to set up a good token system. But once you do, you\u2019ll wonder how you ever lived without it. Your CSS becomes more readable, your design system becomes more robust, and your 3 AM debugging sessions become significantly less traumatic.<\/p>\n\n\n\n<p id=\"82c5\">So go forth, embrace the tokens, and build interfaces that are not just beautiful, but beautifully maintainable. Your future self (and your teammates) will thank you.<\/p>\n\n\n\n<p id=\"9aee\">And remember \u2014 in a world of rapidly changing frameworks and tools, CSS variables as design tokens are the constants you can count on. They\u2019re not going anywhere, they work everywhere, and they make everything better.<\/p>\n\n\n\n<p id=\"0758\">Now if you\u2019ll excuse me, I need to go refactor some magic numbers. Again.<\/p>\n\n\n\n<p id=\"a08c\"><em>Happy tokenizing! \ud83c\udfa8<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Or: How I Learned to Stop Worrying and Love Consistent Design If you\u2019ve ever found yourself hunting through 47 different CSS files trying to figure out why that button is `#3B82F6` while everything else is `#2563EB`, or if you\u2019ve ever had a designer ask you to \u201cjust make everything a bit more blue\u201d and felt [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":54,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_uag_custom_page_level_css":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[5],"tags":[12,10,14,13,11],"class_list":["post-53","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-architecture","tag-angular","tag-css","tag-frontend","tag-html","tag-javascript"],"aioseo_notices":[],"uagb_featured_image_src":{"full":["https:\/\/marshfire.net\/wp\/wp-content\/uploads\/2025\/10\/image.png",1536,1024,false],"thumbnail":["https:\/\/marshfire.net\/wp\/wp-content\/uploads\/2025\/10\/image-150x150.png",150,150,true],"medium":["https:\/\/marshfire.net\/wp\/wp-content\/uploads\/2025\/10\/image-300x200.png",300,200,true],"medium_large":["https:\/\/marshfire.net\/wp\/wp-content\/uploads\/2025\/10\/image-768x512.png",768,512,true],"large":["https:\/\/marshfire.net\/wp\/wp-content\/uploads\/2025\/10\/image-1024x683.png",1024,683,true],"1536x1536":["https:\/\/marshfire.net\/wp\/wp-content\/uploads\/2025\/10\/image.png",1536,1024,false],"2048x2048":["https:\/\/marshfire.net\/wp\/wp-content\/uploads\/2025\/10\/image.png",1536,1024,false]},"uagb_author_info":{"display_name":"marshfire","author_link":"https:\/\/marshfire.net\/wp\/author\/marshfire\/"},"uagb_comment_info":0,"uagb_excerpt":"Or: How I Learned to Stop Worrying and Love Consistent Design If you\u2019ve ever found yourself hunting through 47 different CSS files trying to figure out why that button is `#3B82F6` while everything else is `#2563EB`, or if you\u2019ve ever had a designer ask you to \u201cjust make everything a bit more blue\u201d and felt&hellip;","_links":{"self":[{"href":"https:\/\/marshfire.net\/wp\/wp-json\/wp\/v2\/posts\/53","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/marshfire.net\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/marshfire.net\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/marshfire.net\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/marshfire.net\/wp\/wp-json\/wp\/v2\/comments?post=53"}],"version-history":[{"count":2,"href":"https:\/\/marshfire.net\/wp\/wp-json\/wp\/v2\/posts\/53\/revisions"}],"predecessor-version":[{"id":69,"href":"https:\/\/marshfire.net\/wp\/wp-json\/wp\/v2\/posts\/53\/revisions\/69"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/marshfire.net\/wp\/wp-json\/wp\/v2\/media\/54"}],"wp:attachment":[{"href":"https:\/\/marshfire.net\/wp\/wp-json\/wp\/v2\/media?parent=53"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/marshfire.net\/wp\/wp-json\/wp\/v2\/categories?post=53"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/marshfire.net\/wp\/wp-json\/wp\/v2\/tags?post=53"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}