Marcus Andrey Study
Ler em português Library

Visual design · Step 4 · 6 min read

Spacing scales

A spacing scale built on a 4px base reduces layout decisions from dozens of ad-hoc values to a short, predictable set. How the four-step model works, how Gale applies it, and what happens when you ignore it.

Five precision blocks represent the spacing scale: 4, 8, 16, 32, 64 px. Block heights are proportional to their values. Point at a block to lift it off the plate. Illustration: Marcus Andrey, drawn with Hairline (MIT, Lucas Marques).

Space is the third element of hierarchy. A scale of four values covers 90% of decisions.

What you'll be able to do after reading:

  • Explain why a spacing scale reduces inconsistency across screens
  • Build a 4px-base scale from the four-step model
  • Choose the right spacing step for padding, gap and margin decisions
  • Read Gale's nine-value scale and say what each value is for

1. Space as a hierarchy signal

Color signals "this matters." Type size signals "this comes first." Space signals "these things go together — or they don't." Two elements that sit close are read as related. Two elements separated by a large gap feel like they belong to different groups.

Without a consistent set of spacing values, designers make slightly different choices on every screen. One designer uses 10px between form fields; another uses 12px; a third uses 14px. None of those differences is intentional, but together they make the product look unfinished. A spacing scale — a sequence of space values built from a fixed base unit — eliminates that category of decision. Every padding, every gap, every margin comes from the same list. When a value fits the scale, it looks deliberate.

The same principle applies to type and color: fixing the options reduces the cognitive work of choosing and reviewing. Layout, grids and spacing covers the basics of why space matters; this lesson goes further, to the specific values Gale uses and why each one exists.

2. The four-step model

The model at the center of this lesson: a 4px base with four multipliers. Those four steps — ×0.5, ×1, ×2, ×4 — cover the most common spacing decisions in a UI.

Step Multiplier Value Typical use
Hairline ×0.5 2px Dividers, inline borders, the gap between an icon and its label
Base ×1 4px Padding inside a compact chip, badge or table cell
Double ×2 8px Padding inside a button; gap between items in a row
Quad ×4 16px Padding inside a card; gap between form fields

Two ideas make this model work. First: the 4px base divides cleanly into 1×, 2× and 3× pixel density displays (4 × 1 = 4, 4 × 2 = 8, 4 × 3 = 12 — all whole numbers). Second: the multipliers are powers of 2, so adjacent values are clearly different. A gap of 8px and a gap of 16px read as distinct; a gap of 9px and a gap of 11px do not.

This core can be extended by adding more multiples of 4. For large layout distances — section padding, panel gaps, page margins — you need values beyond 16px. Gale's full scale uses nine values, all multiples of 4 (except the 2px hairline).

3. Gale's spacing scale

Gale's spacing scale (fictional, from Gale.md): 2 · 4 · 8 · 12 · 16 · 24 · 32 · 48 · 64px. All values are multiples of 4, except 2px which is half the base.

In CSS custom properties:

:root {
  --space-2:  2px;
  --space-4:  4px;
  --space-8:  8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;
}

Gale Console — the dense desktop surface — runs at Compact level (a 0.875 multiplier applied to row heights, making table rows 32px tall). Gale Field — the phone surface for technicians working with gloves — runs at Default level, which keeps table rows at 44px and meets the minimum touch area requirement. The spacing scale itself is shared across both surfaces; the level is what changes how it is applied to component height.

4. Applying the scale

Three kinds of spacing decision, and which steps belong to each:

Padding (space inside a component). Use the smaller steps. At Compact level, 4px for the tightest cells, 8px for inputs and buttons. At Default level, 12px and 16px for inputs, 16px for cards.

Gap (space between items in a row or column). Use the middle steps. 4px for dense icon rows or inline labels; 8px between form fields in a compact list; 16px between cards; 24–32px between sections of a page.

Margin (space outside a component, separating it from neighbors). Use the larger steps. 16px between small grouped components; 24–32px between sections; 48–64px for major layout divisions.

Gale Console uses 16px sidebar padding and 4px between sidebar items. The planning card uses 24px internal padding. Every one of those values comes from the scale — which is why the Console feels consistent across different screens even though the content is different on each one.

With the scale in place, the next step is the grid: how to arrange columns for dense products and open pages.


5. Common mistakes

  • Off-scale values. A 10px gap isn't any step in the model. It usually means someone eyeballed it. When you see a 10, ask: should this be 8 or 12?
  • Using the same step everywhere. A 16px gap between items inside a component and a 16px gap between sections makes both look equally related. Use smaller values inside components and larger values between them.
  • Ignoring level. Compact and Default are not interchangeable. Compact is for all-day desktop use by trained users. Default is for mobile and touch contexts. The 32px Compact row height does not meet the 44px minimum touch area; never apply Compact to a touch-first surface.
  • Mixing units without converting. Once the scale is in px, mixing in rem or em values breaks the ratios. Convert or stay consistent.

6. Vocabulary

Term Meaning
Spacing scale The sequence of space values based on a fixed base unit (here, 4px)

7. Try it

You need: a screenshot of a dense product you use daily, or the spacing ruler in the figure above.

  1. Open the screenshot.
  2. Count the number of distinct gap values between items on that screen. Write them down.
  3. For each value, check: is it a multiple of 4? If not, what multiple of 4 is closest?
  4. Identify the three smallest values. Which step of the four-step model (hairline, base, double, quad) does each correspond to?
  5. Find one value that breaks the pattern. Write one sentence about why you think it's there.

How to know it's good: you can describe most gaps with one of the four model steps, and the off-scale values stand out as unintentional.


8. If you already practise

  • When reviewing another designer's work, ask for the spacing rationale before suggesting changes. "Is this on the scale?" is more precise than "this feels tight."
  • The 4px base works at 1×, 2× and 3× pixel density because 4 divides evenly into all three. If your team ever designs at 0.5× scale (common in some tools), 2px becomes your effective base.
  • Material Design 3 uses an 8dp base (Material Design, Understanding layout). IBM's Carbon uses a 2px base. Both produce a compatible set of values — but different intermediates. If you join a team with an existing scale, map their values to the four model steps first before proposing changes.

Checklist

Learn more

Books, courses and videos to go deeper

Book links go to Amazon. As an Amazon Associate I earn from qualifying purchases, at no extra cost to you.

Layout, grids and spacing · Grids for dense screens and marketing pages · Density and touch targets

Saved only on this device.

↑ ↓ to move · Enter to open · Esc to close