Lesson 3 of 30
Whitespace picked one gap at a time is invisible chaos — nobody notices 13px vs 16px directly, but everyone feels the inconsistency. A spacing scale is the fix, the same instinct as a type scale applied to gaps instead of sizes.
11 min read
Every option explains itself — why the right one is right, and why each wrong one is wrong. Miss one and it comes back later on a spaced-repetition schedule.
Question 1 of 3
A heading has more margin above it than below it, even though visually that might seem asymmetric. Why is this a deliberate, common convention rather than a mistake?
Hints without spoilers, and a plain explanation of why a wrong answer was wrong — answered only from this lesson. Free account, no card.
Sign up freeWhat interviewers actually ask about this, and what a strong answer has to cover.
A strong answer covers
Likely follow-ups
Whitespace is not "the space left over" — it's an active part of the design, doing the same job proximity does in the next lesson: showing which things belong together and which don't. But left to arbitrary pixel values, spacing drifts the same way font sizes do: margin: 13px here, gap: 22px there, each individually reasonable, none of it relating to the rest.
The fix is the same idea as a type scale, applied to space: pick one base unit — 8px is the most common convention (some teams use 4px for finer control) — and only ever use multiples of it: 8, 16, 24, 32, 48, 64. This is often called an "8-point grid." Every padding, margin, and gap in the product becomes one of a small, known set of values, the same way every font-size does.
--p-space-1: 0.25rem; /* 4px */
--p-space-2: 0.5rem; /* 8px */
--p-space-3: 0.75rem; /* 12px */
--p-space-4: 1rem; /* 16px */
--p-space-5: 1.5rem; /* 24px */
--p-space-6: 2rem; /* 32px */
--p-space-7: 3rem; /* 48px */
--p-space-8: 4rem; /* 64px */
Arbitrary spacing: 13px here, 22px there, 7px somewhere else — every gap is a one-off decision.
This is a base-4 scale (Praxis's own, one finer-grained step below the more common 8px convention) — the exact base matters less than the discipline: every one of those eight values shows up dozens of times across this product's components. None of them shows up as a one-off padding: 13px anywhere, because there's no --p-space step for 13.
.mdx-article h2) uses a larger top margin than bottom margin.A design review question like "why is the spacing here inconsistent?" is really asking whether a candidate can name the system that's missing, not just the specific pixel that looks off. "Introduce a spacing scale and audit every arbitrary value against it" is a stronger, more senior answer than fixing the one gap that was pointed out.