Reference
What each element receives from the stylesheet, and which attribute changes it. Nothing here needs a class; nothing here is optional to the extent that the page stops making sense.
Landmarks
| Element | Receives | Change it with |
|---|---|---|
html | Document font (--font-ui), colour scheme, base size. | Tokens. |
header | Opening block; data-layout="hero" for a title page. | data-layout |
nav | Inline row of links; singles out aria-current. | data-layout="spread", data-nav |
main | The document column, centred, with vertical rhythm. | — |
article | A self-contained piece; headings inside get the outline. | data-layout="prose" |
section | A thematic run inside an article. | — |
aside | Set-off block for qualifying matter. | data-callout |
footer | Small print, separated by a hairline. | — |
hr | A hairline rule between sections, at the full measure. | — |
Text and flow
| Element | Receives |
|---|---|
h1–h6 | The type scale, --font-heading, tight leading, balanced wrapping. |
p | The document font at reading size, with vertical rhythm between paragraphs. |
strong, em | Weight and stress, no colour change. |
small | One step down the scale, for provenance and captions. |
mark | Accent-tinted highlight, for a passage that was found. |
abbr | Dotted underline when a title is present. |
time, data | Tabular figures, so dates and values line up. |
del, ins | Struck and underlined, distinct from each other at a glance. |
blockquote | Indented measure with an accent rule at the left; footer inside it carries the attribution. |
cite, q | Italic citation, inline quotation with the right marks. |
sub, sup | True raise and drop, without disturbing the leading. |
address | Contact and authorship block, italic. |
Lists and definitions
| Element | Receives |
|---|---|
ul | Real bullets, indented once, with nesting that keeps its measure. |
ol | Numbers aligned on the figure, not on the text. |
dl | Term and definition as a two-column rhythm; dd hangs under its dt. |
li | Tight leading inside items, the parent's rhythm between them. |
Tables
Tables are the argument form of technical writing, so they are styled as one: hairlines instead of boxes, a caption that says what the columns mean, no zebra striping to hide a bad axis.
| Element | Receives |
|---|---|
table | Full measure, figure-aligned numerals, hairline separators. |
caption | Sits above the grid, small caps register, left-aligned. |
thead | Rule under the header row; header cells keep their weight. |
th scope="row" | Row headers read as labels, never as data. |
td | Numeric columns can be aligned with data-* on the cell's content; the default is left for text. |
tfoot | Summary row above a rule, still inside the table's measure. |
Code and data
| Element | Receives |
|---|---|
code | --font-mono inline, tinted surface, no size change to the line. |
pre | Block surface with its own scroll, mono at a smaller step, leading opened for reading. |
pre > code | Losest the inline surface so the block owns the background. |
kbd, samp, var | Key caps, program output, variables — three distinct registers. |
figure[data-pane] | One half of a side-by-side: data-pane="code" and data-pane="result". |
[data-pane-body] | The live rendering inside the result pane, padded from its frame. |
[data-diff] | Diff block; with data-diff-line="added|removed|context|hunk" and data-diff-file. |
Forms
| Element | Receives |
|---|---|
form | Vertical rhythm; data-layout="inline" for a single row. |
fieldset, legend | A rule and a legend that behaves like a heading. |
label | Small register, bound to its input by for. |
input, select, textarea | --font-ui, hairline border, accent focus ring, sized by type. |
button, [role="button"] | Secondary by default: hairline border, surface fill. data-variant="primary" makes it the one next step — ink fill, paper label, accent on hover and focus. data-size="sm|md|lg" scales it. |
output, progress, meter | Inline status with tabular figures. |
Figures and media
| Element | Receives |
|---|---|
figure | Full width, framed, with room for a caption above or below. |
figcaption | Small register; when it is the first child it reads as a label. |
img, video, audio | Block-level, never wider than the measure; no borders, no rounding. |
picture | Inherits the img contract; the source order is yours. |
Disclosure and metadata
| Element | Receives |
|---|---|
details, summary | A real disclosure triangle, replaced by a marker of the same weight as the text. |
[data-ai-disclosure] | A badge declaring authorship: ai-generated, ai-assisted, mixed, autonomous. |
[data-badge] | A small status token, sized to the small register. |
[data-byline] | Author line with tabular date. |
[data-hash] | Verification fragment in mono, de-emphasised. |
data-layout
One attribute, a fixed vocabulary of shapes. It never describes appearance — only the arrangement the document already implies.
| Value | Shape | Use it for |
|---|---|---|
hero | Centred title block with actions | A document's opening |
spread | Ends pushed apart | A site row: mark left, links right |
row, col, stack | Flow along one axis | Groups of peers |
center | Both axes centred, bounded | Standalone notices |
prose | Reading measure, centred | Long-form text |
docs | Sidebar, document, optional margin | Documentation pages like this one |
grid-2, grid-3 | Equal columns, collapsing on narrow screens | Parallel claims, feature trios |
card-grid | Auto-fitting cards with a minimum measure | Collections of short pieces |
stats | Figure-led row, tabular numerals | Numbers that carry the argument |
console | Dense mono block with a frame | Session output, logs |
install | Single command, full measure, framed | The one line a reader must copy |
actions | Buttons in a row, wrapping | What to do next |
report | Numbered sections with a rule | Findings, audits |
timeline, timeline alternate | Vertical spine with nodes | Sequence with dates |
vertical, inline | Stacked or in-line, for single controls | Small components |
Component attributes
| Attribute | Values | Effect |
|---|---|---|
data-card | — | Frames a short article as one item in a grid |
data-callout | tip, warning, error | Set-off note with an accent rule and a label |
data-callout-title | — | Names the callout's rule |
data-pane | code, result | Half of a side-by-side demonstration |
data-pane-body | — | The padded rendering inside a result pane |
data-diff | — | Diff frame; pair with the line attributes below |
data-diff-line | added, removed, context, hunk | Line role, coloured by role not by hand |
data-chart | — | Bar chart from a definition list or table |
data-chart-labels, data-chart-spacing, data-chart-stacked, data-chart-reverse | — | Axis labels, gap, stacking, order |
data-nav, data-nav-links, data-nav-toggle | sidebar, … | Navigation shapes |
data-variant | primary | On a button, input[type="submit"] or [role="button"]: ink fill with a paper label, accent on hover and focus. One per view — it marks the next step, not a decoration. |
data-size | sm, md, lg | Scale of a control or badge |
Document state
| Attribute | Values | Effect |
|---|---|---|
data-ai-disclosure | ai-generated, ai-assisted, mixed, autonomous | Machine-authorship badge on the document |
data-mode | interactive, autonomous | Who is expected to be reading |
data-session, data-session-meta | — | Frames a session transcript and its metadata |
data-redacted | label, reveal | Withheld text, and the control that reveals it |
data-reading-progress | — | Progress for a long document |
data-collapsed, data-show-disclosure | — | Section state and its toggle |
data-paper, data-hero, data-agent-native, data-abstract | — | Article-level treatments for generated prose |
data-demo | — | Marks a block as a demonstration |
data-no-print | — | Removed from the printed page |