On this page

Breakpoints

Beehexa layouts adapt to the window, from a phone to a wide monitor. See what changes at each width and how to design for it.

People check an order on a phone and work through a day of syncs on a wide monitor. The layout changes at a few widths so each screen fits the window it is in.

The layout changes at three window widths: 768, 1024 and 1440 px. Every screen also works at 320 px.

  1. xs0–767
  2. md768–1023
  3. lg1024–1439
  4. xl1440+
Window width in px, drawn to scale; xl has no upper end. Every screen must also work at 320 px.

What changes

Breakpoint From Windows What changes
xs 0 Phones and small windows One fluid layout: 4 columns, gutter and page margin 16 px, content in one column. Side navigation in a drawer.
md 768 px Tablets, narrow windows 8 columns. Gutter and page margin 24 px. Side navigation still in a drawer.
lg 1024 px Laptops, including 1280 and 1366 px screens 12 columns. Side navigation open at 280 px, or collapsed to the 64 px rail. A side panel next to the main one.
xl 1440 px Desktops, including 1536 and 1920 px screens Page margin 32 px. Four cards a row.
  • Below 768 px is one layout. Its columns stretch with the window, from 320 to 767 px. A card or a table inside it can still change with the width of its own container, using container queries.
  • 320 px is not a breakpoint. It is the narrowest window every screen must work in, which is also a 1280 px window zoomed to 400% (WCAG 1.4.10).

Design order

Design for desktop first, then fit the screen to smaller windows. Write the CSS from the smallest window up.

Beehexa products are used mostly on desktop, so their main screens start at the width people use most.

  1. Design at 1440 px, and check it at 1280 px.
  2. Fit it to 1024 px, then to 768 px.
  3. Fit it to 360 px, and check it at 320 px.

In code, the base styles are for the smallest window, and each breakpoint adds to them with min-width. Fewer rules have to be undone that way.

Check every screen at

Window Why
1440 and 1280 px The desktops and laptops people use most
1024 px Just above the point where the side navigation becomes a drawer
768 px Tablets, and the switch to 8 columns
About 844 × 390 px A phone held sideways: wide enough for the tablet layout, but short
360 and 320 px Phones, and the narrowest window allowed
400% zoom People who enlarge the page

Code

  • Write media queries with min-width: @media (min-width: 768px).
  • CSS custom properties cannot be used in media queries. Use the pixel values of these tokens.
  • Change the layout at breakpoints, never the spacing tokens or text sizes inside a component.

Tokens

TokenValueDescription
--bh-breakpoint-xs0pxPhones and small windows, below 768 px. One fluid layout: 4 columns, gutter and margin 16 px, side navigation in a drawer. Must work down to 320 px.
--bh-breakpoint-md768pxTablets and narrow windows. 8 columns, gutter and margin 24 px. Side navigation still in a drawer.
--bh-breakpoint-lg1024pxLaptops from 1024 px, including 1280 and 1366 px screens. 12 columns. Side navigation open at 280 px; people can collapse it to the 64 px rail.
--bh-breakpoint-xl1440pxDesktops, including 1536 and 1920 px screens. Page margin 32 px.