Acknowledgement: Shared by Peter Bamuhigire, techguypeter.com.
-
Start mobile-first, and design — don't reflow. Author the smallest realistic width first
and let layout add structure as space appears (min-width media/container queries only). This
is not just a CSS convention: it forces you to decide what the focal point and hierarchy are
when space is scarcest, which is the honest test of a composition. Per
layout-grid-and-spacing §8, each width is re-composed, never collapsed into one stacked
column of identical cards — that collapse is the single most common responsive slop tell.
-
Prefer intrinsic, content-driven layout over breakpoints. Most "responsiveness" should need
no breakpoint at all. Let CSS Grid and Flexbox respond to content and available space:
grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)) reflows a card field
from 1 to N columns with zero media queries and never produces a too-narrow column. Reach for an
explicit breakpoint only where the design itself must change (a sidebar appears, a nav becomes
a bar, the focal point moves) — not merely because the screen got wider. See
references/container-queries-and-intrinsic.md.
-
Make portable components respond to their CONTAINER, not the viewport. A card, media object,
or stat block that appears in several different column widths must adapt to where it is placed.
Viewport media queries cannot do this — the same card is "wide" in a hero and "narrow" in a
4-up grid at the same viewport width. Use container queries: set container-type: inline-size
on the wrapper and switch the component's internal layout with @container (min-width: …).
This is the core modern capability of this skill — define the breakpoint where the component
breaks, intrinsically, regardless of page context. Patterns in
references/container-queries-and-intrinsic.md.
-
Choose breakpoints from the CONTENT, not from device names. Do not target "iPhone" or
"iPad" widths. Resize until the layout breaks — a line gets too long (>~70–75ch), a column
too narrow to hold its content, a focal point lost — and put a breakpoint there. Keep the set
small (typically 2–4). Express widths in em/rem so breakpoints respect the user's font size.
Full rationale and a starter scale in references/breakpoint-strategy.md.
-
Make size fluid with clamp() instead of stepping at breakpoints. Type, spacing, and
measure should interpolate smoothly between a floor and a ceiling so the page bends rather than
snapping. Fluid type: font-size: clamp(<min>, <preferred-with-vw>, <max>), where the floor and
ceiling are real steps from doctrine/references/type-scale-and-spacing.md (clamp interpolates
between the scale; it does not replace it). Always set a rem floor and ceiling so text
stays readable on tiny screens and never balloons on ultrawide, and so the user can still zoom
(a pure-vw size defeats zoom — a WCAG 1.4.4 failure). Recipe in references/breakpoint-strategy.md.
-
Size images and media to prevent layout shift. Every image/video/embed gets an intrinsic
width/height or aspect-ratio so the box is reserved before load — this is what keeps
CLS ≤ 0.1 per doctrine/references/web-performance-budgets-2026.md. Serve responsive
sources (srcset/sizes, AVIF→WebP→fallback) and lazy-load below the fold. A fluid image is
max-width: 100%; height: auto inside an aspect-ratio box. Never resize a block in a way that
reflows content already on screen.
-
Use logical properties and modern fit functions. Author with inline-size,
margin-inline, padding-block, inset-inline instead of physical width/left/right so
the layout survives RTL and vertical writing modes for free (pairs with
internationalization-and-rtl-design). Constrain measure with width: min(100% - 2rem, 70ch)
and centre content columns with margin-inline: auto; cap line length at ~66ch for body text
regardless of viewport.
-
Re-decide the focal point and asymmetry at every size — apply progressive enhancement, not
graceful degradation. Carry the authored composition from layout-grid-and-spacing (focal
point, intentional asymmetry, uneven whitespace) into each size. The mobile view is not a
lesser version of desktop: decide what leads on a phone, then enrich as width allows (a margin
column appears, an image bleeds off one edge). Mobile must still have a focal point and tension
— not a flat single-column stack.
-
Respect user and device preferences as first-class adaptivity. Honour
prefers-reduced-motion (no large fluid motion for those users), prefers-color-scheme, and
coarse-vs-fine pointers (@media (pointer: coarse) → ≥24px / ideally ≥44px touch targets per
doctrine/references/wcag-2.2-criteria.md target-size). Adaptivity is about the person and
context, not only the pixel width.
-
Run the responsive anti-slop checklist (below). If any item fails, fix before shipping.
-
For Apple surfaces, test resizable windows, not just device presets. On iOS/iPadOS/macOS
and Safari/WebKit, resize through intermediate widths; verify Liquid Glass chrome, safe areas,
toolbars, keyboards, popovers, pointer states, and home-screen PWA display modes do not clip,
overlap, or hide primary actions.