Design tokens before components
The mistake most design systems make is building components before establishing tokens. Here's why the order matters and what happens when you get it backwards.
5 min read
Putting everything in a card is the fastest way to make a page feel like a grid of boxes. Here's how to use containment selectively to create visual rhythm rather than visual noise.
Sahil Jadhav
Founder, Sero Studio
The contained card pattern — a rounded rectangle with a surface background and a visible border — is one of the most useful structural tools in dark-mode web design. It's also one of the most abused. When every section of a page is a card, the card stops communicating anything. It's just a box.
Used selectively, containment creates visual hierarchy. It tells the eye "this content is grouped and important." Used universally, it removes that signal and replaces it with uniform visual noise.
A contained section is heavier than an open section. It has more visual presence. It draws attention. This makes it appropriate for moments that deserve attention — the hero, a primary CTA, a key proof point.
An open section, or a section with only a subtle background tint, creates breathing room. It lets the eye rest between heavier moments. A page with no breathing room is exhausting to read, regardless of how clean each individual component is.
The rule is not "use cards for important content and open layouts for unimportant content." It's "use the contrast between contained and open to create rhythm." A contained section is only visually heavy relative to the open sections around it.
Consider a homepage with eight sections. If you map each section to one of three treatments — card, open, tinted — and alternate them deliberately, the page develops a rhythm:
Hero → card (identity moment)
Trust bar → open (breather)
Work preview → open+border (defined zone, not heavy)
Services → tinted (medium weight)
Process → card (credibility moment)
Testimonials → open (breather)
Blog preview → tinted (medium weight)
CTA → card+accent (conversion moment)Three cards. Two open sections. Two tinted. One bordered band. No two sections with the same treatment appear consecutively. The page has weight in the right places and space where it's needed.
The middle option — a section with a subtle background tint — is underused. color-mix(in srgb, var(--surface) 40%, transparent) is barely perceptible against the page background. But it's enough to tell the eye that a zone boundary exists without the visual weight of a full card.
This matters most in the middle of a page, where you need separation but not emphasis. A card in the middle of a long page can feel like the page is starting over. A tint says "this is different" without disrupting the scroll momentum.
For sections that need definition without weight — a work grid, a feature comparison — a top and bottom border creates a band. The content floats inside it but the section has edges. This is lighter than a tint and much lighter than a card, which makes it appropriate for content that needs to breathe but still needs to feel like its own zone.
The key decision in all of this is making the choice deliberately rather than applying one treatment uniformly. The pattern should be visible when you map it out. If every section is the same weight, there's no pattern — just repetition.
More from the Studio
The mistake most design systems make is building components before establishing tokens. Here's why the order matters and what happens when you get it backwards.
5 min read
Most CMS choices are made too early and regretted too late. Here's why we reach for Sanity on most projects and what makes it worth the setup cost compared to the alternatives.
5 min read
Thoughts on building software, shipped occasionally.