data-layout-align | start · center · end · stretch · baseline · justify | — | Per layout | stack (start · center · end · stretch) default stretch: Cross-axis (inline) alignment of children. start/center/end make children content-sized (semantic sectioning children stop being query containers — see data-container).cluster (start · center · end · stretch · baseline) default center: Cross-axis alignment.reel (start · center · end · stretch) default stretch: Cross-axis alignment of items.columns (justify): justify: justified text with automatic hyphenation. Justified narrow columns form uneven word gaps (WCAG 1.4.8, AAA): prefer ragged-right for long text.split (start · center · end · stretch) default center: Block-axis alignment of the two columns (align-items).media (start · center · end · stretch) default start: Block-axis alignment of the figure and the content.
|
data-layout-centered | Boolean | Presence only | Off | cover: Center the principal and text horizontally; header/footer (and data-layout-cover-top/-bottom) children still span the full width.columns: No effect: columns are always centered (margin-inline: auto). Read by the shared typographic core.prose: Center the container (margin-inline: auto).
|
data-layout-column-count | auto · 1 · 2 · 3 | — | 1 | columns: Number of columns. 2 and 3 are maximums: below about 14rem per column they drop to fewer columns (one on a phone). auto fits as many --column-min-width (38ch) columns as the element's own width allows.
|
data-layout-contain | Boolean | Presence only | Off | <layout-imposter>: Never larger than the containing block (the positioned ancestor, or the viewport when fixed) minus the margin on each side; scrolls inside when the content is bigger.
|
data-layout-content-min | s · m · l | — | m | sidebar: Content column floor before wrapping: 40 / 50 / 60%. One-off: style="--layout-content-min: 45%".
|
data-layout-cover-bottom | Boolean | Presence only | Off | cover (on a child): Pin to the bottom (a <footer> child is pinned automatically).
|
data-layout-cover-top | Boolean | Presence only | Off | cover (on a child): Pin to the top (a <header> child is pinned automatically).
|
data-layout-fill | Boolean | Presence only | Off | split: At least the full viewport height (min-block-size: 100dvh), for full-height sign-in pages.
|
data-layout-fixed | Boolean | Presence only | Off | <layout-imposter>: Position relative to the viewport instead of the containing block.
|
data-layout-gap | none · 3xs · 2xs · xs · s · m · l · xl · 2xl · 3xl | center: bare = m | Per layout | stack default m: Gap between children, on the shared size scale.cluster default s: Gap between items, on the shared size scale.grid default m: Gap between cells, on the shared size scale.center off unless set: Become a full-width flex column (inline-size fills the parent minus the gutters) with this gap between children, on the shared size scale. Bare attribute = m.cover default none: Minimum space between all children (top, principal, bottom), on the shared size scale. The principal's auto margins still centre it.sidebar default m: Gap between the columns, on the shared size scale.switcher default m: Gap between items, on the shared size scale.reel default m: Gap between items, on the shared size scale.split default xl: Gap between the two columns, on the shared size scale.media default m: Gap between the figure and the content, and between content rows.regions default none: Gap between the header, content and footer regions.sidebar-left default m: Gap between the nav and the article.sidebar-right default m: Gap between the article and the aside.data-page-layout default m: Gap between the page regions.
|
data-layout-gutter | none · s · l | — | m | center: Inline padding on each side: none, s or l. The default --size-m applies when the attribute is omitted; there is no m value. The box is content-box, so the gutter adds to the max width.
|
data-layout-intrinsic | Boolean | Presence only | Off | center: Center narrower-than-max content intrinsically (flex column, align center).
|
data-layout-item-width | s · m · l · xl · auto · full | — | auto | reel: Item width: auto (content), s / m / l / xl tokens, or full (100%).
|
data-layout-justify | start · center · end · between | — | start | |
data-layout-limit | 2 · 3 · 4 | — | — | switcher: Force the column layout once there are more than this many items.
|
data-layout-margin | s · m · l · xl | — | — | |
data-layout-max | narrow · normal · wide · prose | — | normal | center: Max inline size of the content box (box-sizing: content-box; the gutter is added outside): narrow (--content-narrow, 40rem), normal (--content-normal, 60rem), wide (--content-wide, 80rem) or prose (65ch).columns (narrow · normal · wide): Same as data-layout-measure (ch-based, unlike layout-center's rem-based data-layout-max).prose (narrow · normal · wide): Same as data-layout-measure (the prose attribute form spells it this way). ch-based — layout-center's data-layout-max="narrow" is 40rem, this one is 45ch.
|
data-layout-measure | narrow · normal · wide | — | normal | columns: Line measure (--measure-narrow / --measure-normal / --measure-wide). Count 1 caps the block width. Counts 2 and 3 cap each column, so the block is at most count × measure + gaps (without the attribute they fill the container). auto uses the measure as the column width.prose: Line measure: --measure-narrow / --measure-normal / --measure-wide (45 / 65 / 80ch by default; data-fluid and the accessibility themes adjust the tokens). Released to 100% in containers narrower than 30rem.
|
data-layout-min | xs · s · m · l · xl · auto | — | Per layout | grid (xs · s · m · l · xl) default m: Minimum column width before wrapping: 8 / 10 / 15 / 20 / 25rem. Tracks are clamped to the container (min(…, 100%)), so a grid narrower than the minimum shows one full-width column instead of overflowing. One-off lengths: style="--layout-min: 220px" (not inherited by nested grids).cover (s · m · l · xl · auto) default xl: Minimum block size: 50 / 70 / 80vh, xl = 100dvh, auto = none. One-off: style="--layout-min: 65vh" (beats the token; registered inherits:false so it never reaches nested layouts; layout-grid reads the same property as its minimum column width).
|
data-layout-nowrap | Boolean | Presence only | Off | cluster: Keep everything on one line; no wrapping. Items overflow a narrow container, so let it scroll (overflow-x: auto).sidebar: Never wrap; the sidebar stays beside the content, also inside a narrow (< 40rem) data-page-layout main.split: Keep two columns below 48rem (viewport) instead of stacking.sidebar-left: Keep nav and article side by side below 48rem.sidebar-right: Keep article and aside side by side below 48rem.data-page-layout: Keep the template below 48rem instead of collapsing to one column.
|
data-layout-overlap | xs · s · m · l | cluster: bare = s | Off | cluster: Overlap items (avatar groups) in DOM order, later items on top, each with a surface-coloured ring. Items after the first are pulled back by xs 0.25rem, s 0.5rem, m 0.75rem or l 1rem. Forces gap 0. Bare attribute = s. Use a ul with one li per avatar, aria-labelledby on the list and an aria-label on the "+N" chip.
|
data-layout-padding | none · s · m · l · xl | — | Per layout | cover default m: Padding on all sides.reel (none · s · m · l) default s: Padding on all sides (block padding leaves room for focus rings and shadows); the same value is the inline scroll padding.
|
data-layout-position | start · center · end · bottom · bottom-end · bottom-start · top · top-end · top-start | — | center | |
data-layout-principal | Boolean | Presence only | Off | cover (on a child): The vertically centered principal element. A sole child auto-centers without it.
|
data-layout-ratio | 1:2 · 1:3 · 2:1 · 3:1 · golden | — | equal (1:1) | split: Column ratio: 2:1, 1:2, 3:1, 1:3 or golden (1.618:1).
|
data-layout-reverse | Boolean | Presence only | Off | switcher: Reverse the visual order when stacked (flex-wrap: wrap-reverse): the last item is on top once items wrap onto their own lines; the row keeps DOM order. Visual only — focus and reading order stay in DOM order, so use it only when the stacked order is presentational.media: Figure on the end side. Visual only: DOM and reading order are unchanged.
|
data-layout-scrollbar | Boolean | Presence only | Off | reel: Show a thin scrollbar. Hidden by default, except under forced colours and on touch-only (hover: none) devices, where it always shows.
|
data-layout-side | end | — | — | sidebar: end: put the sidebar on the end side. Omit the attribute for the start side (there is no start value). nav/aside children keep DOM order (order: 1); the positional fallback reverses the row (flex-direction: row-reverse), so visual order then differs from DOM order.
|
data-layout-subgrid | 2 · 3 · 4 | grid: bare = 3 | Off | grid: Each child becomes a subgrid spanning 2, 3 or 4 rows (bare = 3; any other value also spans 3) so header/content/footer line up across siblings. The subgridded rows use the grid's row gap, so data-layout-gap also spaces the parts inside each child — set row-gap on the children to override. Any child works, including article/section (they are not query containers here unless they carry data-container, which opts them out of subgrid alignment).
|
data-layout-text | Boolean | Presence only | Off | center: Center the text as well.
|
data-layout-threshold | s · m · l | — | m | switcher: The switcher's own width below which the row becomes a column: 25 / 30 / 40rem. No container query is involved. One-off: style="--layout-threshold: 35rem" (not inherited by nested switchers).
|