Opens in a new tab

Set type sizes as tokens

When font sizes are chosen by eye on each page, they slowly drift apart. One page uses 17px for body text, another uses 16px, and a third uses 18px for the same kind of paragraph. Each choice seemed fine at the time, but together they can make the site feel less put together.

Define a set of type tokens (named font sizes), like text-sm, text-base, text-xl and text-3xl, and pick from them everywhere. Headings, labels and body text then stay in one family of sizes. If you later decide body text should be a little larger, you can change text-base once, and every paragraph on the site updates with it.

If you want a different scale for headings and body copy, you can still build it from this core set of utility tokens. text-xl might translate to heading-md, for example. This keeps your entire type system consistent while still giving you easily readable semantic tokens.

George Wert
Created by George Wertgeorgewert.com

Get Free Design Lessons Every Monday Morning

Get Free Design Lessons Every Monday Morning

Three short lessons each Monday on a single design topic. They're written in plain language and give you ideas to use on your next site.

You're in!

Check your inbox for your first email.
Close