Guidelines
Layout
Every page sits on one grid: 4 columns on a phone, 12 from lg up. Space between things comes from a few named groups, so the rhythm is the same on every page.
The grid
grid-layout lays a block on the columns, with the inner gutter between them; container keeps the outer gutter at the edges. The row below is a grid-layout too, so it shows as many columns as the page has at this width.Read from apps/web/frontend.config.json
| Breakpoint | From | Columns | Inner gutter | Outer gutter | Container |
|---|---|---|---|---|---|
xs | 0 | 4 | 16px | 20px | auto |
sm | 640px | 8 | 18px | 30px | auto |
md | 768px | 8 | 20px | 40px | auto |
lg | 1024px | 12 | 24px | 40px | auto |
xl | 1280px | 12 | 32px | 80px | auto |
xxl | 1920px | 12 | 44px | 80px | auto |
Spacing groups
Each group is a CSS variable that changes with the breakpoint, and a utility for every spacing property:
pt-section, gap-y-stack, gap-y-stack-tight. Stack siblings with gap, never with a margin on each child. The bars are each group's height at this width.Read from apps/web/frontend.config.json
sectionBetween the blocks of a page: pt-section.
- xs
3rem- sm
4rem- md
5rem- lg
8rem- xl
8rem
stackBetween a header and what it heads: gap-y-stack.
- xs
2rem- md
2.5rem- lg
3rem
stack-tightBetween a title and its text: gap-y-stack-tight.
- xs
1rem- md
1.25rem- lg
1.5rem
stack-looseBetween items in a grid of work: gap-y-stack-loose.
- xs
3rem- md
4rem- lg
5rem
eyebrowBetween an eyebrow and the title under it.
- xs
1rem
wrapper-topAbove the first block, clear of the fixed nav.
- xs
2rem- md
11rem- xl
10rem
wrapper-bottomUnder the last block, before the footer.
- xs
6rem- md
8rem