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.
| Region | Classes | Job |
|---|---|---|
| Shell | 12 around, 24 between the sidebar and the panel, from md | |
| Sidebar | Hidden below md, a 28 rail from md, 256 from lg | |
| Panel | The one surface. 6 corner and a border from md, edge to edge below | |
| Header | Breadcrumb and search. Its border shows only once the page scrolls | |
| Content | 16 gutters on phones, 40 from md | |
| Page | 1280 at most, centred. Binds from a 1666 window | |
| Gutter | 40 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.
| Prefix | From | What changes | Uses |
|---|---|---|---|
| sm: | 640 | Grids go to 2 and 3 columns, dialog footers to a row | 42 |
| md: | 768 | The sidebar rail and shell padding appear; 40 gutters | 93 |
| lg: | 1024 | The full 256 sidebar | 24 |
| xl: | 1280 | No uses | 0 |
| 2xl: | 1536 | No uses | 0 |
| @sm/ @md/ @lg/ @2xl/ @3xl/ | 384, 448, 512, 672, 768 | Container queries on named containers: App shell, Field group, Page header, Stepper, Stage bar | 59 |
Other widths
| Surface | Width | Classes | Uses |
|---|---|---|---|
| Site pages | 1280 | max-w-(--size-page) | 6 |
| Blocks, marketing | 1152 | mx-auto w-full max-w-6xl px-6 py-16 md:py-24 | 7 |
| App Shell content | fluid | gap-6 p-6 | |
| App Shell aside | 360 | w-(--size-aside) | 1 |
| Library nav | 262 | w-(--size-library-nav) | 0 |
| Phone nav | 288 | Sheet 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.
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.
In the code
- 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.
- 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.
- cBlocks use max-w-6xl, 1152, a stock width, not a --size token.
Rules
- 1Every page sits in max-w-(--size-page), centred. Never set a page width by hand.
- 2Gutters come from the shell: 16 on phones, 40 from md. A page adds none.
- 3Use md for shell changes and container queries for pieces. A piece should not know the window.
- 4Below md the sidebar is a Sheet. Nothing else moves off screen.