Sub topic 9
Describing Responsive Behavior Across Breakpoints
This chapter assumes you already have named spacing tokens and a layout grid from the earlier chapters. It also assumes you know basic CSS, including media queries and flex or grid. The goal is to describe how a design changes between screen widths, so a developer does not have to infer it from three static mockups.
Why static frames are not enough
A design file usually shows a layout at a few widths, such as 375, 768, and 1280 pixels. A browser window can be any width in between. If the handoff shows only the three frames, the developer must guess what happens at 600 or 1000 pixels. Different guesses produce different results, and the gaps surface late in review.
A good responsive spec answers two questions for every region of the page:
- What changes at each breakpoint?
- What stays fluid between breakpoints?
Define the breakpoints once
A breakpoint is a viewport width at which the layout changes. Name your breakpoints and list them in one place, the same way you name tokens. State whether each value is a minimum width (the layout applies from that width up) or a maximum width.
| Name | Applies from | Columns | Side margin | Gutter |
|---|---|---|---|---|
| compact | 0 px | 4 | 16 px | 16 px |
| medium | 600 px | 8 | 24 px | 24 px |
| expanded | 960 px | 12 | 32 px | 24 px |
Choose breakpoints where the content stops fitting, not at the widths of popular devices. If a card row looks cramped at 900 pixels, that is a better breakpoint than a phone model's screen width.
Say what changes and what stays fluid
For each component or section, write down the behavior as a rule. Three kinds of rule cover most cases:
- Reflow. Items move to a new arrangement, such as three columns becoming one stacked column.
- Resize. Items scale within limits, such as an image filling its column up to a maximum width.
- Swap or hide. A different pattern replaces the first, such as a full navigation bar becoming a menu button.
Give limits for anything fluid. "The card grid is fluid" is not enough. "Cards are at least 280 px wide and share the row equally; the row holds as many cards as fit" is a spec a developer can build.
.card-grid {
display: grid;
gap: var(--space-3);
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.nav-menu-button {
display: inline-flex;
}
.nav-links {
display: none;
}
@media (min-width: 960px) {
.nav-menu-button {
display: none;
}
.nav-links {
display: flex;
gap: var(--space-3);
}
}The grid needs no media query because its rule already describes the fluid behavior. The navigation needs one because the pattern itself is swapped at 960 pixels.
Show the decision path
A small diagram helps when a section has several behaviors.
Cover the details people forget
Add these items to the responsive notes for each section:
- Text. Whether font sizes change per breakpoint, and the maximum line length for body text.
- Images. Aspect ratio at each size and how the image crops, for example "16:9 on expanded, 4:3 on compact, focal point stays centered."
- Touch targets. Controls keep a minimum tap size of about 44 px on compact screens, even if the desktop version is smaller.
- Order. Reading order when columns stack. A sidebar that sits on the right on desktop may need to come before or after the main content on mobile.
- Overflow. What happens to long text, wide tables, and many tabs: wrap, truncate, or scroll sideways.
Check your spec
Before handing off, resize the design frame slowly or use the tool's responsive constraints. Look for any width where something overlaps, wraps awkwardly, or leaves an empty gap. Add a note or a new breakpoint for each problem you find.
Exercise
A feature section shows three cards in a row at 1280 px and one card per row at 375 px. The designer wrote "cards are responsive." Rewrite this note so a developer can build it, and name the rule type used.
Show answer
For example: "Cards reflow. Each card is at least 280 px wide and the cards share the row equally. The row holds as many cards as fit, so it shows three on expanded and one on compact. Gap is space-3 at all widths." This is a reflow rule with a fluid minimum width. The note gives a limit, the gap token, and the expected result at both sizes.