The Twelve Sizes of Christmas
Cut a pile of font sizes down to one scale.
Door 3 · Design lesson · About 10 minutes for the whole door
What this door is worth
- 3 stars: First Submit passes
- 2 stars: A hint, or one or two failed Submits
- 1 star: Three or more failed Submits
- 0 stars: After showing the answer
The rule
Pick every font size from one scale: 16px for body text, times 1.25 for each step up.
You choose two numbers once. After that, the scale picks every size for you.
Why it works
Sizes picked by eye drift close together. A screen with 14, 15 and 17px text has three sizes that look almost the same, so none of them reads as more important. Your eye sees the difference and takes it for a mistake.
On a scale, each step is a quarter bigger than the last. No two sizes land almost equal, so the biggest one can lead:
| Token | Size | Use |
|---|---|---|
| --text-sm | 12.8px | Small print |
| --text-base | 16px | Body text, lists, labels, fields, buttons |
| --text-lg | 20px | Section headings |
| --text-xl | 25px | Key figures |
| --text-2xl | 31.25px | The page title |
If a size is not on the list, you do not use it. 15px is never the answer.
Save the steps as tokens
Write the scale once, as CSS custom properties on :root, and use nothing else:
:root {
--text-base: 16px;
--text-lg: 20px;
}
h2 {
font-size: var(--text-lg);
}This is what door 1's spacing scale did for padding. When a new size is needed, you take the next step up or down instead of a guess.
Fewer is calmer
A scale is also a short list. Most screens need four sizes or fewer: a title, one size that leads below it, body text and perhaps small print. You do not have to use every step. A short heading can stay at 16px and stand out through weight and colour.
Body text stays at 16px
Text people read in full, and type into, is 16px or more. Only small print, such as a note under a list, steps down.
What to look for
- Sizes that are not on the scale, such as 14, 15 or 22px.
- More than four sizes on one screen.
- Body text, labels or fields under 16px.
Quiz
Three questions about the rule. Sign in to see the answers and pick yours.
- Your type scale is 16px, times 1.25 for each step up. A section heading looks a little small at 20px. What do you try next?
- A screen uses 31.25, 25, 20, 16 and 12.8px. Every size is on the scale. What is wrong?
- The labels above your form fields are 13px, so they look quieter than the fields. What should they be?
Sign in to answerYour stars are saved to your account.
Fix the page
The problem
Sleighlist's Budget screen grew one font size at a time. Each one was picked by eye, and now there are nine of them.
- The title is 34px and the big figure is 27px.
- The headings and figures in between are 22px, 19px and 17px.
- The intro, the amounts and the button are 15px.
- The list and the field are 14px, the labels are 13px and the note is 11px.
What to do
- Take every font size from the scale: 12.8, 16, 20, 25 or 31.25px.
- Use four sizes at most.
- Make body text, list items, labels and the field at least 16px.
Change only the CSS. The HTML is fine as it is.
Press Run checks as often as you like. Press Submit when every check passes. Fewer hints and fewer failed Submits earn more stars.
How do you want to fix it?
- By handEdit the HTML yourself. The preview updates as you type.Sign in to fix it by hand
- With your AICopy a prompt for your AI, then paste its answer back. Add your own rule to see how much better it does.Sign in to fix it with your AI
You can switch at any time. The stars are the same either way.
How stars work
Most doors are worth up to 6 stars: 3 from the quiz and 3 from the fix.
Quiz. One star for each right answer. Your first answer is final.
The fix. Press Submit and confirm. Your first passing Submit sets your stars.
| Your first passing Submit | Stars |
|---|---|
| No hints, no failed Submits | 3 |
| With a hint, or after one or two failed Submits | 2 |
| After three or more failed Submits | 1 |
| After showing the answer | 0 |
- Run checks is free. Run it as often as you like. It never costs a star.
- Only your first hint lowers your stars. After that, hints cost nothing extra.
- Show me the answer opens after three failed Submits, or once you have read every hint. You keep your quiz stars.
Gold. Pass a door within 24 hours of it opening and it turns gold. Every door stays open until 31 December, so a late pass still earns stars.
Snow Days. If a door doesn't turn gold while you have a streak, a Snow Day is used for you once its 24 hours are up. Your streak carries on, but that door doesn't add to it. You have three for December.
By hand or with your AI, the stars are the same.