Skip to main content
⌘K

Search

Search pages, pieces and blocks.

Layout

One shell for every page: a sidebar, a panel, and the page inside it, never wider than 1280. Five breakpoints, the standard ones; md is the one that changes the shell.

Page
1280
Gutters
16, 40 from md
Sidebar
256 from lg

The shell

This page, to scale, measured from the shell in site-shell.tsx. Hover a region.

At 1440 the panel is 1136 wide and the page fills it. The 1280 cap binds from a 1666 window.

  • Shellp 12, gap 24
  • Sidebar256
  • Panel1136, r 6
  • Headerpt 40, pb 15
  • Contentpt 24, pb 40
  • Gutters40 a side
  • Pagemax 1280

Regions

Click a class string to copy it.

RegionClassesJob
Shell12 around, 24 between the sidebar and the panel, from md
SidebarHidden below md, a 28 rail from md, 256 from lg
PanelThe one surface. 6 corner and a border from md, edge to edge below
HeaderBreadcrumb and search. Its border shows only once the page scrolls
Content16 gutters on phones, 40 from md
Page1280 at most, centred. Binds from a 1666 window
Gutter40 a side from md, 16 below

Breakpoints

The standard ones; globals.css sets no --breakpoint. Uses count the prefix in src. md does most of the work.

sm 640md 768lg 1024xl 12802xl 1536cap 1666
PrefixFromWhat changesUses
sm:640Grids go to 2 and 3 columns, dialog footers to a row42
md:768The sidebar rail and shell padding appear; 40 gutters93
lg:1024The full 256 sidebar24
xl:1280No uses0
2xl:1536No uses0
@sm/ @md/ @lg/ @2xl/ @3xl/384, 448, 512, 672, 768Container queries on named containers: App shell, Field group, Page header, Stepper, Stage bar59

Other widths

SurfaceWidthClassesUses
Site pages1280max-w-(--size-page)6
Blocks, marketing1152mx-auto w-full max-w-6xl px-6 py-16 md:py-247
App Shell contentfluidgap-6 p-6
App Shell aside360w-(--size-aside)1
Library nav262w-(--size-library-nav)0
Phone nav288Sheet w-72 p-3 pt-[calc(--spacing(3)+env(safe-area-inset-top))]2

Do and don't

The page width is also a reading width.

Meeting point

Meet at the blue lifeguard tower at 8:45. Parking is on the street above the beach, free before 10:00. Boards and wetsuits wait at the school van by the steps, and the instructor has the list of names for the morning group.

DoLong text sits in a column of about 60 to 75 characters, even when the page is wide.

Meeting point

Meet at the blue lifeguard tower at 8:45. Parking is on the street above the beach, free before 10:00. Boards and wetsuits wait at the school van by the steps, and the instructor has the list of names for the morning group.

Don'tA paragraph run to the full panel. Lines this long lose the reader at every return.

In the code

  1. aThe header pads with pb-2.75 and md:pb-3.75, 11 and 15. With its 1px border they make 12 and 16, but the numbers are off the scale.
  2. bOne nav width: the site sidebar is lg:w-64, 256. --size-library-nav, 262, is left from the old Library nav and nothing uses it.
  3. cBlocks use max-w-6xl, 1152, a stock width, not a --size token.

Rules

  1. 1Every page sits in max-w-(--size-page), centred. Never set a page width by hand.
  2. 2Gutters come from the shell: 16 on phones, 40 from md. A page adds none.
  3. 3Use md for shell changes and container queries for pieces. A piece should not know the window.
  4. 4Below md the sidebar is a Sheet. Nothing else moves off screen.