Foundations
Layout
Breakpoints, responsive gutters and the layout components every web page is built from.
How the web pages are laid out, from breakpoints and gutters to the components that frame every view. Every value is a token; the components read them, so one token edit moves every page.
Breakpoints
A rule applies at or below the value on its axis. CSS can't read a custom property in @media, so stylesheets write the number and go test holds every @media length to one of these tokens. --bp-* carries each value for scripts.
Phone, tablet and desktop
The web app (site header, app bar and a list–detail split) at 390, 768 and 1280 wide, in the docs theme.
| Viewport | Gutter | Site header | App layout |
|---|---|---|---|
| Desktop (> 900) | spacing.gutter 20 | Full | Panes side by side, side sheets |
| Tablet (761–900) | spacing.gutterCompact 16 | Full | Compact: pane steps, bottom sheets, touch-size tabs |
| Phone (≤ 760) | 16; 12 (spacing.gutterNarrow) at ≤ 390 | Collapsed: links scroll, tools in a menu | Compact |
| Landscape phone (≤ 500 tall) | 16 | Collapsed, 52 tall | Compact; the map sheet stays at the side from 600 wide |
Layout components
- App shell: the full-height frame and the responsive gutter.
- Site header: brand, area links and the tools menu.
- App bar and Tab strip: the app's views.
- List–detail split: panes that become steps on compact screens.
- Map shell: the map with side or bottom sheets and a tools dock.
- Page container, Section header and Card grid: pages that scroll as a whole.
Widths and spacing
Pane and page widths (size.paneNarrow, paneList, paneWide, readingWidth, dashboardWidth, pageWidth, sideSheet, sideDock) are in Spacing › Sizes with the page spacing (spacing.gutterCompact, gutterNarrow, mapInset, pageTop, pageBottom). The iOS app reads @chitransit/signal/tokens and the same sizes; its own layout is a full-screen map under the core sheet.