DESIGN.md is a prompt artifact. It tells AI tools what your design system looks like. But you also want those same tokens living in your actual codebase as CSS variables, so your hand-written code and your AI-generated code share the same values.
Here is the exact mapping. Copy what you need.
Why you want tokens in CSS
When an AI tool reads your DESIGN.md and generates a component with color: var(--primary), that variable needs to exist in your CSS. Otherwise the generated code references nothing.
More importantly: consistency. If your DESIGN.md says primary is #5E6AD2 but your global.css has --blue: #4A90E2, you have two different systems. One of them will win and it will not be the one you intended.
One source of truth. DESIGN.md defines it. CSS variables expose it. Tailwind references it. Done.
Colors
Every color token in your DESIGN.md becomes a CSS custom property. The names map directly.
Use these exact names. AI tools that read your DESIGN.md will reference them by name in the code they generate. If your CSS uses different names, the reference breaks.
Typography
Typography tokens split into font family, size, weight, line height, and letter spacing. Each gets its own variable.
You will not use all of these in every component. But having them defined means you can write font-size: var(--size-body) anywhere and know it will always match what the AI is generating from the DESIGN.md.
Spacing and radius
The spacing scale becomes numbered variables. The numbers match the pixel values, not sequential indices.
Tailwind integration
If you are using Tailwind, wire the CSS variables into the theme extend section. This lets you use Tailwind classes like bg-surface and text-muted that AI tools will naturally reach for.
Now when Claude or Cursor generates a card component using bg-surface border-border, those classes actually work.
Dark mode
Use data attributes, not the prefers-color-scheme media query. Data attributes let you toggle programmatically without fighting the browser default.
The only tokens that change between light and dark are backgrounds, surfaces, text, and borders. Colors like primary, success, danger, and warning stay the same.
Let the AI do it
You do not have to map all of this by hand. Drop your DESIGN.md into Claude and use this prompt:
You will get a complete CSS file back in under 30 seconds. Review it, drop it into your globals.css, and you are done.
The one thing to check: make sure the variable names in the generated CSS match what the AI will use when generating components. If you see any mismatches, fix the CSS variable names to match the DESIGN.md token names exactly.
Get the DESIGN.md first
Browse 110 design systems, download the DESIGN.md, then turn those tokens into CSS variables.
Browse the catalog