← All posts
CSSTailwind

Design tokens in Tailwind CSS 4, without the guesswork

Jasurbek Haydarov 6 min read

Tailwind 4 moved configuration into CSS. That sounds like a small change until you notice your design tokens now live in the same file as the styles that use them.

Start from the palette, not the utilities

Name colors by role — canvas, ink, accent — and let the hex values change underneath. When the brand shifts, you edit one block.

@theme {
  --color-canvas: #F1E9DC;
  --color-ink: #2F4038;
  --color-accent: #B86752;
}

Keep shadows hard

Flora uses offset shadows with zero blur. They read as paper layered on paper, and they stay crisp on any screen density.

Decoration should support the words, never sit on top of them.

That's the whole trick: tokens for the system, restraint for the page.