Overview

What @layer base covers, how the 23 files are grouped, and the two conventions that run through all of them.

@layer base styles native HTML elements so that unstyled markup already looks right. There is no class to apply: write <table>, <blockquote> or <input type="date"> and they are styled.

Every value comes from a custom property resolved by @uncinq/design-tokens and @uncinq/component-tokens. This package hardcodes almost nothing, so restyling is a matter of changing a token, not overriding a rule.

css/base.css imports all 23 files below, one page each.

Typography and text

PageFileSelectors
Bodybase/body.cssbody: background, text color, font family, size, weight, line-height
Headingsbase/headings.cssh1 to h6, plus a per-level size from --font-size-heading-01 to -06
Paragraphsbase/typography.cssp: block spacing and --max-width-paragraph
Linksbase/link.cssa: colour, underline, focus ring, external-link marker
Listsbase/list.cssul, ol, li in prose context, including nested indentation
Blockquotesbase/blockquote.cssblockquote, blockquote cite
Codebase/code.csscode, kbd, samp, pre, and inline code separately from block code
Addressbase/address.cssaddress: removes the UA italic and resets inner paragraph spacing
Abbreviationsbase/abbr.cssabbr[title]: dotted underline with its own offset and thickness
Superscriptbase/sup.csssup: raised without growing the line box

Media and embedded content

PageFileSelectors
Figuresbase/figure.cssfigure, figcaption, and nested picture, img, .credit
Picturebase/picture.csspicture: inline-block
Videobase/video.cssvideo: fluid width, auto height
Tablesbase/table.csstable, thead, tbody, th, td
Detailsbase/details.cssdetails, summary, details[open], the marker and the disclosed panel

Forms

Six of these seven files are largely inspired by KNACSS.

PageFileSelectors
Inputs and labelsbase/form.csslabel, legend, and input excluding button, reset, submit, checkbox, radio and range
Checkboxesbase/form-checkbox.css[type='checkbox'] when it is not a switch, plus its adjacent label
Radiosbase/form-radio.css[type='radio'] plus its adjacent label
Rangebase/form-range.css[type='range'], the .range wrapper and the .range-value output
Selectbase/form-select.cssselect and optgroup, with a token-driven chevron
Switchbase/form-switch.css[role="switch"], rendered as a track and knob
Textareabase/form-textarea.csstextarea, including field-sizing: content

Text-like controls (input, textarea, select, checkbox, radio) draw their outline with box-shadow: inset and border: 0, so that focus and hover states change colour without shifting layout by a pixel. The switch and the range thumb are the exceptions: both need a real border, since their outline is part of a shape that moves.

Accessibility helpers

PageFileShips
Accessibility helpersbase/accessibility.css.visually-hidden, .visually-hidden-focusable

It is the only file in this layer that ships classes rather than element selectors.

Two conventions run through every file

Hover is guarded. Every hover style in this layer sits inside @media (hover: hover) and (pointer: fine), so nothing sticks on touch.

Motion is guarded. Every transition sits inside @media (prefers-reduced-motion: no-preference).

Overriding

Redefine the token rather than the rule:

@layer base {
  :root {
    --table-cell-padding-block: 0.5rem;
  }
}

Several files read a component-scoped property with a semantic fallback, for example var(--code-font-family, var(--font-family-code)). That gives you two levels: change the component token to affect only that element, or the semantic token to affect everything that inherits from it.