Responsive Breakpoint Strategy
Choose breakpoints based on where your content actually breaks, not a fixed device-width list.
Paste this into your agent.
Copy-pasting Bootstrap's or Tailwind's default breakpoints (640px, 768px, 1024px, 1280px) works fine as a starting point, but treating them as sacred causes layouts that look fine at the named breakpoints and break at everything in between.
When to use
- Any layout that needs to work across phone, tablet, and desktop widths.
- Component-level responsiveness (a card grid, a sidebar) as much as page-level.
Principles
- Breakpoints should be defined by content, not devices. Resize the browser slowly and note the width where the layout actually starts to look wrong — that's your breakpoint, not an arbitrary device width.
- Prefer container queries over viewport media queries for components that get reused in different contexts (a card that appears both in a wide grid and a narrow sidebar needs to respond to its own container's width, not the page's).
- Design mobile-first (base styles = smallest screen,
min-widthmedia queries add complexity upward) — it forces prioritization of what's essential.
Instructions
- Start with the single-column, smallest-viewport version of a layout and get content hierarchy right before adding responsive complexity.
- Add a breakpoint only when the current layout visibly breaks (text wrapping awkwardly, elements overlapping, excessive whitespace) — not preemptively at standard device widths.
- For reusable components, use container queries (
@container) so the component adapts to its slot, not the viewport. - Test the messy middle widths (600–900px, common for split-screen desktop windows and tablets), not just phone and full-desktop widths.
- Keep the number of breakpoints small — 3 to 4 is usually enough. Every additional breakpoint is another layout to test and maintain.
Examples
css.card-grid {
container-type: inline-size;
}
@container (min-width: 480px) {
.card { flex-direction: row; }
}
Avoid
- Don't hardcode
@media (max-width: 768px)throughout a codebase — centralize breakpoint values as tokens so they can change in one place. - Don't design only for the exact breakpoint widths; check the pixels just before and after each one.
References
- CSS Container Queries (baseline-available in all major browsers as of 2023); content-first responsive design as popularized by Ethan Marcotte.
Add to your agent
Print this skill from the terminal, or connect the whole catalog over MCP. Setup guides
CLI
MCP server
Questions
Related skills
React Native Best Practicesby callstackincubator
React Native performance optimization guidelines for FPS, TTI, bundle size, memory leaks, re-renders, and animations.
ResponsiveExternalGitHub stars: 1.7K
Siteplane Dashboard Shellby UI Skillbook
A responsive app frame that combines the sidebar, a sticky top bar and a scrolling content area.
Siteplane UI
Siteplane Filter Barby UI Skillbook
A layout strip above a list or table for view tabs, search, filter menus, actions and applied-filter tags.
Siteplane UI
Siteplane Sidebarby UI Skillbook
Application navigation in a side column that collapses to an icon rail on desktop and becomes a sheet on mobile.
Siteplane UI