# Token reference

Every semantic token a component may consume, and what it is for.

Source: https://bugstars-docs.pages.dev/theming/token-reference/

---

This page is a **child of** [**Theming**](/theming/) — it sits under it in the sidebar because of where its file lives, not because of anything in its frontmatter:

<CodeBlock language="text" showCopy={true}>

```
src/content/docs/theming.mdx                  →  /theming/
src/content/docs/theming/token-reference.mdx  →  /theming/token-reference/
```

</CodeBlock>

A page nests when a page exists at its parent path. It inherits that parent's `group`, so the two levels can't disagree — and moving the file is the only thing that changes the nesting.

<Alert variant="tip" title="Use it for the long tail" text="A reference table, a troubleshooting appendix, a per-platform variant — anything a reader needs occasionally but shouldn't have to scroll past. Two levels is the practical limit for a sidebar; past that, a reader can't see where they are."/>

## Text

<ParamList params={[{ name: "--color-text", type: "color", description: "Body copy. Prose is set on this, not on `--color-text-strong`." }, { name: "--color-text-strong", type: "color", description: "Headings, and anything that has to win against body copy." }, { name: "--color-text-muted", type: "color", description: "Supporting copy: ledes, table cells, callout bodies." }, { name: "--color-text-faint", type: "color", description: "Metadata that should recede — dates, captions, group labels." }, { name: "--color-text-inverse", type: "color", description: "Text on an inverse band. Flips with the theme." }, { name: "--color-link", type: "color", description: "Links. Points at `--color-accent` by default." }]}/>

## Surfaces

<ParamList params={[{ name: "--color-bg", type: "color", description: "The page." }, { name: "--color-bg-surface", type: "color", description: "One step off the page: panels, table headers, the tab strip." }, { name: "--color-bg-muted", type: "color", description: "Two steps off: the active sidebar item, inline code." }, { name: "--color-bg-inverse", type: "color", description: "The opposite end of the ramp. Dark on a light page, light on a dark one." }, { name: "--color-border", type: "color", description: "Hairlines and panel edges." }, { name: "--color-border-strong", type: "color", description: "A border that has to be noticed — a hovered card, a focused field." }]}/>

## The accent

<ParamList params={[{ name: "--color-accent", type: "color", description: "The interactive color: links, active nav, focus rings, annotation markers." }, { name: "--color-accent-hover", type: "color", description: "Its hover state." }, { name: "--color-accent-on", type: "color", description: "Text sitting **on** the accent. Check the contrast if you change either." }, { name: "--color-accent-surface", type: "color", description: "A tint of the accent: note callouts, the announcement bar, a soft band." }, { name: "--color-accent-border", type: "color", description: "A border on that tint." }]}/>

## Code

Code blocks stay dark in both themes, so these four don't flip.

<ParamList params={[{ name: "--color-code-bg", type: "color", description: "The code panel." }, { name: "--color-code-text", type: "color", description: "Code that carries no syntax color of its own." }, { name: "--color-code-muted", type: "color", description: "Comments, and the prompt in a command line." }, { name: "--color-code-border", type: "color", description: "The panel's edge, and the rule above a block's notes." }, { name: "--color-code-highlight", type: "color", description: "A highlighted line's background. The accent draws its left bar." }]}/>

## Everything else

Spacing, radius, type, line height, borders, shadows, z-layers and motion are all `src/styles/variables/*`. Print `npm run lint:css-vars -- --list` for the full set — it reads them out of the files, so it can't go stale.

<Alert variant="danger" title="An unresolved token fails silently" text="`var(--color-text)` is invalid at computed-value time, so the declaration just inherits — no error in review, the build, or usually the page. `npm run check` fails on it, which is the only reason you find out."/>
