Sub topic 3
Using white space to separate and group
White space is the empty area around and between elements. It is not wasted room. It is the main tool you use to show which items belong together and which do not. This chapter assumes you know the proximity principle from the previous chapter, basic typography terms (size, weight, line spacing), and the common layout elements: headings, body text, images, and buttons.
What white space does
White space is also called negative space. It does not have to be white. Any area with no content counts, whatever its color. It does three jobs:
- Separates unrelated items, so the reader sees where one idea ends and another begins.
- Groups related items, because items with less space between them read as a unit.
- Rests the eye, so dense content is easier to scan.
Proximity says that close items look related. White space is how you control that closeness. Every gap you set is a statement about how items relate.
Two kinds of white space
- Micro white space is the small gap inside a component. Examples are line spacing, the gap between a heading and its paragraph, and the padding inside a button.
- Macro white space is the larger gap between components, such as the margin around a page or the space between sections.
A layout reads clearly when macro gaps are clearly larger than micro gaps. If the two are nearly equal, the reader cannot tell where groups begin and end.
A worked example
Look again at the card from the spine. The code below sets a small gap inside each card and a larger gap between cards.
.card {
display: grid;
gap: 8px;
padding: 24px;
max-width: 40ch;
}
.card + .card {
margin-top: 32px;
}There are three spacing values here, and each has a role:
gap: 8pxis micro space. The heading and paragraph inside one card stay tight, so they read as a pair.padding: 24pxkeeps content away from the card edge, so the card has room to breathe.margin-top: 32pxis macro space. It separates one card from the next.
The between-card gap (32px) is four times the inside gap (8px). That ratio is what makes each card look like a single unit. If you set both to 16px, the heading of the second card would sit as close to the first card's text as to its own paragraph. The reader would have to guess where each card starts.
Choosing a spacing scale
Do not pick gap values at random. Choose a small scale and reuse it. A common choice is a base unit of 8px, with steps that are multiples of it.
| Step | Size | Typical use |
|---|---|---|
| Small | 8px | Between a heading and its paragraph |
| Medium | 16px | Between paragraphs, inside buttons |
| Large | 32px | Between cards or sections |
A fixed scale keeps your gaps deliberate. It also prepares you for the repetition chapter, where these values become reusable tokens.
Common errors
- Equal spacing everywhere. If every gap is the same, nothing is grouped. Vary the gaps to show structure.
- Space added in the wrong place. A heading that sits closer to the paragraph above it than to the one below it looks like it belongs to the wrong section. Put more space above a heading than below it.
- Filling every gap. Crowding content to avoid empty areas makes a layout look busy and hard to scan. Empty areas are part of the design.
- Too much space. If gaps grow so large that related items drift apart, grouping fails in the opposite direction.
Quick check procedure
Use this test on any layout:
- Squint at the page until the text blurs.
- Note the clumps you see. Each clump should be one group of related content.
- If clumps merge, increase the macro gap. If one group falls apart, reduce the micro gap.
Exercise
A card has a heading, a paragraph, and a button. The gap between the heading and paragraph is 24px, and the gap between this card and the next card is 24px. Readers cannot tell where one card ends. What would you change, and why?
Show answer
Make the micro gap smaller and the macro gap larger, for example 8px inside the card and 32px between cards. When the inside and between gaps are equal, proximity gives no signal about grouping. A clear difference in gap size makes each card read as one unit.
Exercise
Name the two kinds of white space described in this chapter, and give one example of each.
Show answer
Micro white space is the small gap inside a component, such as line spacing or the gap between a heading and its paragraph. Macro white space is the larger gap between components, such as the space between sections or the page margin.