A page
Measured, centred, with a gutter.
# Base elements Bare HTML elements style themselves. Write semantic markup (`
`,
``, ` Measured, centred, with a gutter. So is this. A link here is light, because the text around it is.`, `
`, `
`) and it looks right with no classes. This is
`base.css` in `@layer base`.
Because base rules sit in the `base` layer (below `components` and `utilities`),
any class you add wins automatically. There's no specificity battle: the layer
order does the work, so you never need `!important` to override a base style.
## Spacing
Flow content is spaced for you. Headings, paragraphs, lists, quotes, tables,
figures, forms and rules carry vertical margins, so an ordinary page reads as a
document without a single class.
Margins collapse between siblings, so a heading's bottom margin and the
following paragraph's top margin resolve to the larger of the two rather than
adding up. First and last children reset their outer margin, so a padded
container (a `.card`, a `.callout`) never gains a phantom band of space inside
its own padding.
The layout primitives space their children with `gap` instead, so they clear
those margins: `.stack`, `.cluster` and `.row` all zero the flow margins of
their direct children. A gap-based layout never doubles up, and you don't have
to know that to get it right.
## Width is a class, never a default
This file styles elements. It sets no width, no centering and no page padding
on anything, so nothing here can move your layout and nothing changes when you
add a class.
Width comes from [layout](layout), where it is named and visible in the markup:
```html
A page
A page
Readable
` starts clean, and the layout primitives strip
them again for exactly that case: `
` is a row of links, not
a bulleted list.
Definition lists render `dt` semibold and `dd` indented in `--ink-soft-flow`.
## Quotes and rules
`blockquote` gets a left rule and italic `--ink-soft-flow` text. `hr` is a single
`--rule` top border.
## Code, pre, kbd
- `code`: monospace, on a `--bg-muted` fill with small padding and
`--radius-xs`.
- `pre`: monospace block on `--bg-inverse` with `--ink-inverse` text,
`--radius-surface`, and horizontal scroll. `pre code` resets its own fill so
nested code doesn't double up.
- `kbd`: a small keycap: monospace, muted fill, a `--rule` border and a subtle
bottom shadow.
`
` uses `--bg-inverse`, so it **flips** with the theme (dark block in light
mode, light block in dark mode). The terminal component is different: it stays
dark in both modes. See [terminal](components/terminal).
## Icons
Size every `svg` on the tag, with `width` and `height`. An `svg` carrying only
a `viewBox` fills whatever contains it, so an icon paints full-page for as long
as it takes its CSS to arrive. Attributes hold before any stylesheet does,
which is what makes them the right place for a size.
```html