Mobile-First Responsive Design Patterns That Actually Work
Beyond media queries — progressive enhancement, fluid typography, container queries, and layout patterns for modern responsive design.
Mobile-first design isn't just about starting with a narrow viewport — it's a philosophy of progressive enhancement. You begin with the essential content and functionality, then layer on complexity as the viewport and device capabilities grow. This approach produces better designs, faster load times, and more accessible experiences.
Fluid Typography with clamp()
Instead of fixed font sizes with breakpoint-based overrides, use CSS clamp() for fluid typography that scales smoothly with the viewport. No media queries needed — the font size interpolates linearly between a minimum and maximum.
/* Fluid typography — no media queries needed */
:root {
/* Min 16px at 320px viewport, max 20px at 1280px viewport */
--text-base: clamp(1rem, 0.917rem + 0.42vw, 1.25rem);
/* Min 24px, max 48px */
--text-heading: clamp(1.5rem, 0.75rem + 3.75vw, 3rem);
/* Fluid spacing scales with viewport too */
--space-section: clamp(3rem, 1.5rem + 7.5vw, 8rem);
}
h1 { font-size: var(--text-heading); }
p { font-size: var(--text-base); }
section { padding-block: var(--space-section); }Container Queries: The Future of Responsive Components
Media queries respond to the viewport. Container queries respond to the parent container. This is a game-changer for component-based design systems — a card component can have different layouts depending on whether it's in a sidebar (narrow) or main content area (wide), regardless of the viewport width.
.card-container {
container-type: inline-size;
}
.card {
display: grid;
gap: 1rem;
}
/* When the container (not viewport) is > 400px, switch to horizontal layout */
@container (min-width: 400px) {
.card {
grid-template-columns: 200px 1fr;
}
}Touch-First Interaction Design
- Minimum touch target: 44×44px (Apple) or 48×48dp (Google). Anything smaller frustrates mobile users.
- Thumb zones: Place primary actions in the bottom half of the screen where thumbs naturally rest.
- Hover states are bonuses, not requirements. Never hide critical information or actions behind hover.
- Swipe gestures should supplement, not replace, visible buttons. Not all users discover gesture interactions.
Test your designs on a real mobile device, not just a browser resize. The feel of tapping a button, scrolling a list, and navigating between views reveals issues that desktop simulation misses.
Modern CSS — clamp(), container queries, subgrid, :has() — has eliminated most of the hacks and workarounds that made responsive design painful. Embrace these tools, design mobile-first, and progressively enhance for larger screens. Your users on every device will thank you.
Emily Nakamura
Design Systems Lead