Skip to content
Velloreth
Web Development 7 min read

Responsive Design Breakpoints: Choosing Them Properly

Breakpoints should follow your content, not device names. Learn how to choose them, the mobile-first approach, and modern alternatives.

By

Breakpoints follow content

The most common mistake is choosing breakpoints from a list of device widths.

/* Device-driven: arbitrary */
@media (min-width: 375px) { }  /* iPhone */
@media (min-width: 768px) { }  /* iPad */
@media (min-width: 1024px) { } /* iPad landscape */
@media (min-width: 1440px) { } /* Desktop */

The problem: devices change constantly, and the widths do not correspond to where your layout actually breaks. A three-column card grid might break at 700px, not 768px.

The right approach: start with no breakpoints, resize the browser slowly, and add a breakpoint where the layout breaks.

/* Content-driven: added where needed */
@media (min-width: 45rem) { }  /* the card grid needs a second column */
@media (min-width: 64rem) { }  /* the sidebar fits beside the content */

The breakpoint is a response to a specific layout failure, not a device.

Mobile-first

Write the base styles for small screens, then add complexity with min-width.

/* Base: mobile */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* Tablet and up */
@media (min-width: 45rem) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop and up */
@media (min-width: 64rem) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

Why mobile-first:

  • Simpler CSS. Each query adds to the previous state rather than undoing it.
  • Better mobile performance. Mobile devices do not download and evaluate desktop rules they will not use.
  • Forces prioritisation. You decide what matters most, because the base styles are the mobile experience.
  • Fewer overrides. max-width stylesheets accumulate unset and revert declarations.

The alternative, desktop-first with max-width, works but tends to produce more complex CSS:

/* Desktop-first: each query undoes the previous */
.cards { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 64rem) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 45rem) {
  .cards { grid-template-columns: 1fr; }
}

Both are valid. Mobile-first is usually easier to maintain.

Use em or rem, not px

Media queries in em respect the user’s font size setting, which matters for accessibility.

/* px: ignores the user's font size preference */
@media (min-width: 768px) { }

/* em: respects it */
@media (min-width: 48em) { }

A user who has increased their default font size gets a layout appropriate to their reading size, not one designed for a 16px default.

The conversion: 768px / 16 = 48em.

Fewer breakpoints

Each breakpoint is a place where the layout can differ, and every one adds testing surface.

Most sites need two or three:

/* Base: single column */
/* 45rem: two columns */
/* 64rem: three columns, sidebar beside content */

If you have ten breakpoints, the layout is probably too rigid. Modern CSS can often remove them entirely.

Modern CSS that reduces breakpoints

auto-fit grids

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

This adapts to any width with no media queries. The browser fits as many 280px columns as possible.

clamp() typography

h1 {
  font-size: clamp(1.75rem, 1rem + 3vw, 3rem);
}

The font size scales with the viewport between a minimum and a maximum. No breakpoints needed.

flex-wrap

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

Items wrap when there is no room, which handles narrow viewports without a query.

Container queries

The most significant recent addition. A component responds to its container, not the viewport.

.card-wrapper {
  container-type: inline-size;
}

@container (min-width: 400px) {
  .card {
    display: flex;
    gap: 1rem;
  }
}

The card switches to a horizontal layout when its container is wide enough, regardless of the viewport. This makes components genuinely reusable — the same card works in a narrow sidebar and a wide main column.

Container queries are supported in all modern browsers.

What to change at a breakpoint

Not everything needs to change. The usual candidates:

Column count. One column to two to three.

Navigation. A hamburger menu to a horizontal bar.

Sidebar position. Below the content to beside it.

Font size. Larger headings on wider screens.

Spacing. More generous padding on desktop.

Visibility. Hiding decorative elements on small screens.

What should not change: the content itself. Hiding content on mobile is usually a mistake — the mobile user needs the information too.

Testing

Resize slowly. Drag the window from narrow to wide and watch for the layout to break. That is where a breakpoint belongs.

Test at the extremes. 320px is the narrowest common width. Test very wide too, where line lengths can become unreadable.

Test with a large font size. Increase the browser’s default font size to 24px and check the layout still works.

Test with zoom. 200% zoom should not break the layout.

Test with long content. A long word, a long title, a large image. Content is the variable that breaks layouts.

Test on a real device. Emulators miss touch target sizes and real rendering differences.

Organising breakpoints

Once you have more than two, keeping them consistent matters.

Define them as custom properties so the values live in one place.

:root {
  --bp-sm: 30rem;  /* 480px */
  --bp-md: 48rem;  /* 768px */
  --bp-lg: 64rem;  /* 1024px */
  --bp-xl: 80rem;  /* 1280px */
}

Custom properties cannot be used inside media query conditions, because media queries are evaluated before custom properties resolve. The tokens are still useful as documentation and for use in clamp() and container queries.

Use a preprocessor or a build step if you want named breakpoints in media queries. Sass mixins are the traditional approach:

@mixin md {
  @media (min-width: 48rem) { @content; }
}

.cards {
  grid-template-columns: 1fr;
  @include md {
    grid-template-columns: repeat(2, 1fr);
  }
}

Document the breakpoints in a comment at the top of the stylesheet, with the reason for each. A breakpoint with no stated reason tends to be copied and never questioned.

/* Breakpoints
 * 30rem — the nav no longer fits horizontally
 * 48rem — the card grid fits two columns
 * 64rem — the sidebar fits beside the content
 */

Testing across breakpoints

A breakpoint is only correct if the layout works on both sides of it.

Test just below and just above each breakpoint. A layout that works at 767px and 769px may break at exactly 768px, where the query flips.

Test the extremes. 320px is the narrowest common viewport. Very wide screens need a max-width on the content, or line lengths become unreadable.

.prose {
  max-width: 70ch; /* readable line length at any viewport */
  margin-inline: auto;
}

Test with long content. A long unbroken word, a long title, a large image. Content is the variable that breaks layouts, and placeholder text hides the problem.

Test with a large font size. Set the browser default to 24px and check the layout still works. This is where em-based breakpoints pay off.

Test with zoom at 200%. WCAG requires content to remain usable at 200% zoom without horizontal scrolling.

Practical guidance

  • Choose breakpoints where the content breaks, not from device names.
  • Write mobile-first with min-width queries.
  • Use em or rem in media queries.
  • Keep to two or three breakpoints.
  • Reach for auto-fit, clamp(), and flex-wrap before adding a query.
  • Use container queries for reusable components.
  • Do not hide content on mobile — reflow it instead.
  • Test by resizing slowly, not by checking device widths.

For the related guides, see mobile-first-css and css-custom-properties. For the broader context, css-grid-complete-guide and css-flexbox-complete-guide.

Quotable summary

Breakpoints should be chosen where the content breaks, not from a list of device widths, because devices change and the widths rarely correspond to where a layout actually fails. Mobile-first means writing base styles for small screens and adding complexity with min-width media queries, which produces simpler CSS and better mobile performance. Fewer breakpoints are better — most sites need two or three, not ten. Modern CSS reduces the need for them: auto-fit grids, clamp() typography, flex-wrap, and container queries all adapt without media queries. Test by resizing slowly and watching for the layout to break, rather than checking specific device widths, and use em or rem in media queries so the layout respects the user’s font size setting.

Frequently asked questions

What are the standard responsive breakpoints?
There is no standard set. Common values are 640px, 768px, 1024px, and 1280px, but the right breakpoints are wherever your content breaks. Start with none and add one when the layout fails.
What is mobile-first design?
It means writing the base CSS for small screens and using min-width media queries to add complexity as the viewport grows. It usually produces simpler CSS and better performance on mobile.
Should I use min-width or max-width media queries?
Prefer min-width, which is the mobile-first approach. max-width queries are useful for exceptions, but a stylesheet built on min-width is easier to reason about because each query adds to the previous.
How many breakpoints should I use?
As few as possible. Most sites need two or three. Each breakpoint is a place where the layout can differ, and every one adds testing surface.
What are container queries?
Container queries let a component respond to the size of its container rather than the viewport. They make components genuinely reusable, because a card can adapt to a narrow sidebar or a wide main column without knowing the viewport width.
Do I still need breakpoints with modern CSS?
Less often. auto-fit grids, clamp() typography, and flex-wrap handle many cases without media queries. Breakpoints remain useful for structural changes, like moving a sidebar from below the content to beside it.