skip to content

Spacing & Layout

How a system sizes and places things: units, a whitespace scale, column grids and breakpoints. Interviewers probe it because consistent rhythm is the cheapest way a UI reads as designed.

part ofDesign systems & UX foundationsoverview, primer and where to startread it →
on this pageshow

explore

questions

18

In a design system, why give breakpoints names such as compact, medium and expanded rather than pixel values or device labels?

level: juniorimportance: must knowfreq 48%

answer

  1. one vocabulary for design and code
  2. ranges of window width, not hardware
  3. change a threshold once, specs follow
  4. split-screen, resizing and zoom change class
  5. names outlast this year's screen sizes

basics

~20 s

Named window-width classes give designers, web and native engineers one vocabulary for ranges of available space. They describe the window rather than the hardware, so split-screen, resizing and zoom land in the right layout, and thresholds can change without rewriting specs.

solid answer

~40 s

Named breakpoints, or **window-width classes** such as `compact`, `medium` and `expanded`, turn a few thresholds into a shared vocabulary: designers, web engineers and native engineers all specify "what changes in medium" instead of trading pixel numbers, and the system can tune a threshold once while every spec that uses the name follows. The classes describe the **available window width**, not the hardware, because the device does not decide how much room the app has. A tablet running two apps side by side, a phone turned sideways, an unfolded foldable, a narrow desktop window and a desktop zoomed to 400% (which WCAG 2.2's Reflow criterion expects to work at a 320-pixel-equivalent width) each land in the class their width deserves. Device labels also age as new screen sizes ship; width ranges do not.

go deeper

for a junior

Recall that breakpoints are named ranges of window width, and use the names in specs and code instead of pixel numbers or device words.

for a middle

Explain why a name decouples specs from threshold values, and why window width rather than device decides the class, using split-screen and zoom as examples.

for a senior

Show how you would catch teams drifting into private breakpoints, and how you would test layouts across whole ranges, including zoomed desktop windows.

for a principal

Weigh aligning the system's classes with each native platform's own window groupings against one system-wide set, and what either choice costs cross-platform teams.

## What a named breakpoint is A **breakpoint** is a width at which a layout changes structure: a navigation bar moves, a single column becomes two panes, a list gains a detail view. A **named breakpoint**, often called a **window-width class**, gives each *range* between two breakpoints a name, such as `compact`, `medium` and `expanded`, and the design system publishes that small set as the widths at which page layouts are allowed to change. In a telecom self-service app, the account area might be specified once per class: in `compact`, usage, bills and add-ons stack in one column under a bottom navigation bar; in `medium`, a side rail replaces the bar and the usage meter sits beside the balance; in `expanded`, the bill list and the selected bill's detail share the screen as two panes. ## Why names instead of pixel values - **One vocabulary for three audiences.** A designer's frame in a design editor, a web engineer's stylesheet and a native engineer's layout code can all say "medium" and mean the same range, even though each platform measures width in its own unit. - **One place to change a threshold.** When testing shows the two-pane bill layout needs more room, the system moves the `expanded` threshold once, usually as a token, and every spec that says "expanded" follows. Specs that hard-coded a number each have to be found and edited. - **Fewer accidental breakpoints.** When teams write raw numbers, each picks slightly different ones, and the product ends up with a dozen near-identical widths where layouts flip. A short list of names makes an off-list width visible in review. - **Specs describe intent.** "In compact, the add-ons list opens as a sheet" says what the layout is for; "below 599 pixels" says only where it happens. ## Why window width instead of device Device labels (phone, tablet, desktop) look friendlier, but the device does not decide how much room the app has. The **window** does. | Situation | Device label says | Window-width class says | |---|---|---| | Tablet running two apps side by side | tablet | compact or medium, depending on the split | | Large phone turned sideways | phone | often medium | | Foldable phone, unfolded | phone | medium or expanded | | Desktop window dragged narrow | desktop | compact | | Desktop window zoomed to 400% | desktop | compact | The last row is also an accessibility requirement. **WCAG 2.2 success criterion 1.4.10 Reflow (Level AA)** requires content to be usable without scrolling in two dimensions at a width equivalent to 320 pixels, and the criterion notes that this is what a 1280-pixel-wide window becomes at 400% zoom. A desktop user who zooms in therefore gets the compact layout, and it must carry the same information and functions, not a cut-down subset. A system that keyed its layouts to "desktop devices" would hand that user a layout that no longer fits. Device-named breakpoints also age badly: each year brings new screen sizes, and a list keyed to today's hardware needs revisiting, while a range of available width stays meaningful. ## How teams use the names day to day 1. The designer frames each screen at a representative width inside each class the product supports, and notes what changes when the class changes. 2. The engineer implements the layout switch against the system's named thresholds, never a local number. 3. Reviewers and visual tests exercise each class, including widths near the edges of a range, not only one "phone" and one "desktop" size. 4. When a layout genuinely fails between two classes, the problem is raised with the system team rather than patched with a private breakpoint. ## Pitfalls - **A class as a device in disguise.** Calling `compact` "mobile" in specs quietly reintroduces the device assumption, and the team stops testing narrow desktop windows. - **Designing only at the thresholds.** A class is a range; the layout has to hold at every width inside it, which is why most systems combine named classes with fluid behaviour between them. - **Treating values as frozen.** Names are meant to be stable; their values are not. Keeping the names while tuning the values is exactly what naming buys. - **Two dialects across platforms.** If web says "tablet" and native says something else, the shared vocabulary is lost. Native platforms already group windows into width classes of their own, so aligning the system's names with those groupings, or publishing an explicit mapping, keeps one language.

  • Should a design system's breakpoint names be identical on web and native?
    Ideally the same names and roughly the same ranges, so one spec reads the same on every platform. Native platforms already group windows into width classes of their own, so many systems align with those groupings or publish an explicit mapping. What matters is that a designer's 'medium' means one range to every team, even though each platform measures width in its own unit.
  • What happens to a named-breakpoint layout when a desktop user zooms to 400%?
    Zoom shrinks the effective window width: a 1280-pixel window behaves like a 320-pixel-equivalent one, so the compact layout takes over. WCAG 2.2's Reflow criterion, Level AA, expects content at that width to work without two-dimensional scrolling and without losing information or functionality, so the compact layout must be complete, not a trimmed phone version.

saying these in an interview costs you the question

  • Breakpoints should be named after devices such as phone, tablet and desktop.
  • A phone always gets the compact layout, whatever its window is doing.
  • Once breakpoints are named, their threshold values can never be adjusted.
  • Named breakpoints mean each screen only needs designing at the exact threshold widths.
  • Breakpoint names are an engineering detail; designers can keep specifying raw pixel widths.
open as a page

In a design system's column grid, what are columns, gutters and margins, and what job does each one do?

level: juniorimportance: must knowfreq 50%

basics

~20 s

Columns are the vertical tracks that content spans; gutters are the fixed spaces between columns that keep neighbouring content apart; margins are the space between the outer columns and the window edge. Together they give every screen shared alignment lines.

open as a page

In a design system, why use a spacing scale built on a base unit such as 8 instead of choosing each space case by case?

level: juniorimportance: must knowfreq 55%

basics

~20 s

A spacing scale replaces endless one-off guesses with a few shared steps, so screens share one rhythm and are quicker to design, build and review. A base unit such as 4 or 8 makes every step a simple multiple.

open as a page

In a design system shipped to web and native mobile, why are sizes specified in density-independent units rather than physical device pixels?

level: juniorimportance: must knowfreq 55%

basics

~20 s

Screens differ several-fold in pixel density, so a size given in hardware pixels renders at a different size on each. Density-independent units are multiplied by each device's scale factor, giving roughly one perceived size everywhere from a single spec.

open as a page

In a design system, what are inset, stack and inline spacing, and why define them as separate roles?

level: juniorimportance: should knowfreq 40%

basics

~20 s

Inset is the space inside a container around its content, stack is the vertical space between stacked elements, and inline is the horizontal space between items in a row. Naming the roles makes intent explicit and clarifies who owns each space.

open as a page

In a design system's layout guidance, how do adaptive and fluid responsive layouts differ, and when should a screen region use each?

level: middleimportance: should knowfreq 44%

basics

~20 s

A fluid (responsive) layout stretches one design continuously with the window; an adaptive layout switches between a few distinct designs at breakpoints. Most systems combine them: structure adapts between width classes, and content flows within each class.

open as a page

In a design system, how do you reconcile content-driven breakpoints with the few named breakpoints that every product team shares?

level: middleimportance: should knowfreq 40%

basics

~20 s

Place the few shared breakpoints where the system's shell and page templates actually break, not at device widths. When one component's content breaks elsewhere, fix it inside that component against its own width instead of adding another shared breakpoint.

open as a page

In a design system, why does a layout grid's column count usually change with window size, and why are 12 columns so common?

level: middleimportance: should knowfreq 40%

basics

~20 s

Fewer columns on narrow windows keep each column wide enough to hold content; a common convention is 4 on phones, 8 on tablets and 12 on desktops. Twelve is popular because it divides evenly into halves, thirds, quarters and sixths.

open as a page

In a design system, how does a fixed-width column grid differ from a fluid one, and when would you choose each?

level: middleimportance: should knowfreq 42%

basics

~20 s

A fixed grid keeps columns a set width and lets outer margins absorb extra space; a fluid grid stretches its columns with the window while gutters stay fixed. Most systems combine them: fluid up to a maximum content width, then fixed.

open as a page

In a design system's spacing scale, why do the steps usually widen as values grow instead of rising in equal increments?

level: middleimportance: should knowfreq 42%

basics

~20 s

People perceive spacing differences relative to size: 4 units is obvious between 8 and 12 but invisible between 60 and 64. Widening steps keep every step visibly different, so fewer steps express every level of grouping.

open as a page

In a design system on an 8-point spacing grid, how should text line heights align with the spacing scale, and why?

level: middleimportance: should knowfreq 36%

basics

~20 s

Line heights, not font sizes, should be multiples of the base unit or half-step, because the line box is what occupies layout space. Then text blocks and the components holding them land on the grid, and spacing stays predictable.

open as a page

In a design system, which dimensions should scale with the user's text-size setting and which should stay fixed, and why?

level: middleimportance: should knowfreq 45%

basics

~20 s

Text and whatever holds it should scale: type sizes, line heights, the minimum heights of text-bearing components and icons inline with labels. Structural and decorative values such as borders, dividers, corner radii and focus-ring thickness usually stay fixed.

open as a page

In a telecom app's design system, a plan card that works full-width on phones breaks in a desktop sidebar despite page overrides; what component rule fixes this?

level: seniorimportance: should knowfreq 38%

basics

~20 s

Make the card respond to the width of the slot it sits in, not to the window's breakpoint. Page templates respond to window-width classes; each component's spec defines its layouts by its own available width, so it works in any placement without overrides.

open as a page

In an applicant-tracking tool's design system, pipeline cards and the candidate side panel no longer line up with the page grid; how do you diagnose and fix it?

level: seniorimportance: should knowfreq 30%

basics

~20 s

Overlay the grid and find where edges leave the column lines. Usual causes are hard-coded component widths, containers whose inset shifts content, nested regions with different gutters and spans that forget inner gutters. Let layouts own spans and components fill them.

open as a page

In a food-delivery app's design system, an audit finds 37 distinct spacing values across restaurant cards and menu screens; how do you bring spacing back onto the scale?

level: seniorimportance: should knowfreq 32%

basics

~20 s

Inventory and classify the values first: near-miss drift, systemic causes such as borders or off-grid line heights, deliberate exceptions, and genuinely missing steps. Fix shared components before screens, replace raw numbers with spacing tokens, and add checks so drift cannot return.

open as a page

In a veterinary clinic booking app's design system, users on the largest text size see time-slot chips clipped and pet names cut off; how do you diagnose and fix it?

level: seniorimportance: should knowfreq 38%

basics

~20 s

Reproduce at the largest setting and at double size, then trace breaks to components whose heights or widths are fixed while text grows. Switch specs to minimum heights, let labels wrap or reveal truncated text, reflow crowded rows, and test large text.

open as a page

In a design system, what is a baseline grid, and why do many product interfaces choose not to enforce one strictly?

level: middleimportance: nice to knowfreq 24%

basics

~20 s

A baseline grid is a set of horizontal lines at a fixed interval on which every line of text sits, so neighbouring columns align line for line. Product interfaces often skip it: dynamic content and scalable text make it costly.

open as a page

In a design system, why do hairline dividers and centred icons sometimes look blurry on certain screens, and how do specs prevent it?

level: middleimportance: nice to knowfreq 26%

basics

~20 s

When a logical value maps to a fraction of a hardware pixel, such as a 1-unit line at 1.5x or an icon centred with a half-unit offset, the renderer blurs or rounds it. Specs prefer values that land on whole pixels.

open as a page