{# canonical_base is the OWNING tenant's origin: all 16 Peasy domains serve the same catalogue, so a page rendered by a non-owner points its canonical at the owner instead of competing with it. Falls back to this site for static/self-owned pages. #}
🍋
Menu
Best Practice Beginner 1 min read 285 words

Responsive Design Breakpoint Strategy for Modern Devices

Choosing the right breakpoints prevents layout issues across the ever-growing range of screen sizes. Learn content-driven breakpoint strategies that outperform device-based approaches.

Key Takeaways

  • Setting breakpoints at exact device widths (375px for iPhone, 768px for iPad) creates a fragile system that breaks whenever a new device launches.
  • These ranges (used by Tailwind CSS) cover the vast majority of real-world devices without targeting specific models.
  • Mobile-first means writing base styles for small screens and adding complexity with `min-width` media queries.
  • CSS Container Queries let components respond to their parent container width rather than the viewport.
  • Do not rely on browser DevTools alone.

The Problem with Device Breakpoints

Setting breakpoints at exact device widths (375px for iPhone, 768px for iPad) creates a fragile system that breaks whenever a new device launches. A better approach is content-driven breakpoints: resize your browser until the layout breaks, then add a breakpoint at that width.

Name Min Width Typical Devices
sm 640px Large phones, small tablets
md 768px Tablets portrait
lg 1024px Tablets landscape, small laptops
xl 1280px Laptops, desktops
2xl 1536px Large monitors

These ranges (used by Tailwind CSS) cover the vast majority of real-world devices without targeting specific models.

Mobile-First vs Desktop-First

Mobile-first means writing base styles for small screens and adding complexity with min-width media queries. This approach produces cleaner CSS because mobile layouts are simpler — you add features rather than overriding them.

Container Queries

CSS Container Queries let components respond to their parent container width rather than the viewport. This is ideal for reusable components (cards, widgets) that appear in sidebars, grids, and full-width layouts at different sizes.

Testing Strategy

Do not rely on browser DevTools alone. Test on real devices to catch touch-target issues, font rendering differences, and scroll behavior. At minimum, test on one iOS device, one Android device, and one tablet. Use cloud-based device labs for broader coverage without maintaining a physical device collection.

Common Mistakes

  • Fixed-width containers that overflow on small screens
  • Hover-only interactions with no touch equivalent
  • Images without max-width: 100% that break layout
  • Forgetting the viewport meta tag, which disables mobile responsiveness entirely