Skip to content
Astera Technology

CSS layout allocation

Box budgets, flex lines, grid tracks, columns and shared tracks.

Astera Technology

Fit padding and borders inside a declared width

Measure a 200px panel and account for its content, padding and border.

Practical lesson
Astera Technology

Contain a first paragraph margin with flow-root

Compare a child margin inside a new formatting context with a collapsed parent/child margin.

Practical lesson
Astera Technology

Let a flex text item shrink without cutting its text

Allocate a long filename and a fixed tag inside a 240px flex row.

Practical lesson
Astera Technology

Predict flex wrapping from item widths and gaps

Test the one-pixel boundary between two items on one line and one item per line.

Practical lesson
Astera Technology

Push a trailing flex item with an auto margin

Allocate free space before a trailing item while keeping source order unchanged.

Practical lesson
Astera Technology

Stop a long token inflating a fractional grid track

Keep an 80px label and a 170px content track inside a 260px grid.

Practical lesson
Astera Technology

Flow one article through columns instead of grid cells

Inspect line fragments of one paragraph flowing through two columns.

Practical lesson
Astera Technology

Align nested rows with shared grid tracks

Measure two nested rows against the same 90px label track and 162px content track.

Practical lesson