DreamLake

Spacing & layout

Eleven spacing steps from 2 to 40px. There's no token — values are used inline. Most padding lives between 6–18px; the 2px row gap is sacred. The big jumps at the top (20 → 28 → 40) are for section breathing room, not row rhythm.

Spacing scale

space-2
2px
space-4
4px
space-6
6px
space-8
8px
space-10
10px
space-12
12px
space-14
14px
space-16
16px
space-20
20px
space-28
28px
space-40
40px

Page grid

The docs site itself is the canonical example: a 3-column grid at 1320px max width — 240px left rail, 1fr content, 240px right rail — with 0 gaps between columns. Everything inside lays out against this frame.

css
.page {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 240px;
  max-width: 1320px;
  margin-inline: auto;
}

Breakpoints

Two breakpoints in current use, both for the docs shell:

  • max-[1100px] — drop the right rail (TOC). Content widens to fill the remaining space; the left nav stays at 240px.
  • max-[880px] — drop the left nav too. Single-column layout; chrome collapses.

No "mobile-first" set of named breakpoints. Everything is desktop-first; the two overrides are the only places the layout changes.

Tab row: contextual actions on the right

A tabbed panel's few actions for the visible view sit at the right end of its tab row, never in an extra header, toolbar or footer. The tab strip keeps the remaining width and scrolls, so the actions never widen the panel. See TabbedContainer → Contextual actions.

Document and framed content tabs keep their label boxes steady across selection. Inactive rounded fills sit 2px inside the top and bottom of the tab box; hover changes the fill rather than the box size. Labels and trailing badges stay vertically centered, with compact space before the close control.

Touch: card meta goes to the bottom-right corner

A card header with always-visible actions on a touch device (hover: none) is one line: title, then the buttons, centred on the title; the title truncates against them. The meta (timestamp) is not squeezed in beside the buttons — it sits in the card's bottom-right corner, right-aligned on the footer row. This overrides the narrow-card rule (meta on its own line below 20rem) for touch cards with top-right actions only — pointer cards keep it. See ProfileCard.