Step 4 of 7

Layout

Five composable primitives plus Copy, one space ratio, and a measure axiom. Compose these instead of writing bespoke margin stacks or a breakpoint for every block. Next, Pieces put these on controls. Then Pages compose a landing.

Axioms

Measure

No reading line exceeds --cds-measure. Set it in ch so the cap tracks font size. Flow text is capped; structural shells are not.

Suggestion over prescription

Prefer max-inline-size, gap, and flex-basis over fixed width and height, so content is never clipped.

One ratio

--cds-ratio seeds space from 1rem. Larger steps multiply; sub-body steps stay for chrome.

Boxes

Global border-box, logical properties, and content-box on reading columns so ch measures text, not padding.

The approach follows the intrinsic-layout ideas in Every Layout by Heydon Pickering and Andy Bell.

Primitives

Stack

Vertical rhythm
owned by gap
not child margins

.cds-stack · --sm / --md / --lg · even gap, like items only

Copy

Eyebrow

Title sits with the lede

The button is a new thought, so it gets more air.

Proof meta

.cds-copy · proximity, not one gap

Cluster

Wraps when it must even gap no media query

.cds-cluster · --center / --between

Grid

Tile
Tile
Tile
Tile

.cds-grid · wraps at --cds-grid-min · --center for stats · --five for five even tracks

Center

A centred column stops at the measure, so the reading line stays honest even when the shell is wide.

.cds-center · --gutter

Split

Copy
Media

.cds-split · wraps at --cds-split-min

Space scale

Step Value Use
134 / 8 / 12pxChrome only: control padding, tight gaps
416pxBase step, seeds the ratio
524pxDefault stack gap, card padding
6836 / 54 / 81pxSection rhythm, page bands

--cds-ratio 1.5 · steps 5–8 multiply

Shape and depth

sm
radius-sm Inputs, small controls
md
radius Surfaces, alerts, tiles
lg
radius-lg Large media frames
pill
radius-pill Buttons, chips

Border only

The quiet default for most modules.

Light shadow

--cds-shadow for cards on the page wash.

Lifted

--cds-shadow-md only when something floats.

Depth stays quiet Prefer a border plus a background shift over stacked shadows. No neon glow, no multi-layer coloured shadows, and no glass blur as a brand device.