Padding the Halls
Give every card the same room to breathe.
Door 1 · 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 your padding from a short list of numbers, and give things of the same kind the same padding.
That is all. It is the cheapest way to make a screen look designed.
Why it works
Your eye is very good at spotting things that almost match. A card with 14px of padding beside a card with 16px looks like a mistake, even if nobody could tell you why.
A spacing scale removes the choice. Ours goes up in steps of 4:
| Step | Size |
|---|---|
| 1 | 4px |
| 2 | 8px |
| 3 | 12px |
| 4 | 16px |
| 6 | 24px |
| 8 | 32px |
If a value is not on the list, you do not use it. 15px is never the answer.
Same kind, same padding
Three cards in a list are the same kind of thing. They get the same padding, on all four sides, every time.
A common slip is padding that is tight on top and loose on the sides, such as 10px 18px. Text then sits too close to the top edge and the card looks squashed. Start with one value all the way round. Change it only when you can say why.
Room to tap
Padding is also what makes a button big enough to press. A finger needs a target about 44px tall. If a button holds one line of 16px text, it needs 12px of padding above and below to get there.
What to look for
- Padding values that are not multiples of 4.
- Cards in the same list with different padding.
- Buttons shorter than 44px.
Quiz
Three questions about the rule. Sign in to see the answers and pick yours.
- Your spacing scale is 4, 8, 12, 16, 24, 32. A card looks a little tight at 12px. What do you try next?
- Three cards in one list have padding of 16px, 16px and 12px. What is wrong?
- A button holds one line of 16px text with a line height of 1.5. How much padding above and below makes it at least 44px tall?
Sign in to answerYour stars are saved to your account.
Fix the page
The problem
Sleighlist shows three gifts as cards. Somebody set the padding on each card by eye, and it shows.
- The first card uses
14px 18px. - The second uses
10px. - The third uses
16px 16px 9px. - The "Mark as bought" buttons are 30px tall.
What to do
- Give all three cards the same padding, taken from the 4px scale: 4, 8, 12, 16, 24 or 32.
- Use the same value on all four sides.
- Make every button at least 44px tall.
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.