Token reference
Every semantic token a component may consume, and what it is for.
This page is a child of Theming — it sits under it in the sidebar because of where its file lives, not because of anything in its frontmatter:
src/content/docs/theming.mdx → /theming/
src/content/docs/theming/token-reference.mdx → /theming/token-reference/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.
Use it for the long tail
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
--color-textcolorBody copy. Prose is set on this, not on
--color-text-strong.--color-text-strongcolorHeadings, and anything that has to win against body copy.
--color-text-mutedcolorSupporting copy: ledes, table cells, callout bodies.
--color-text-faintcolorMetadata that should recede — dates, captions, group labels.
--color-text-inversecolorText on an inverse band. Flips with the theme.
--color-linkcolorLinks. Points at
--color-accentby default.
Surfaces
--color-bgcolorThe page.
--color-bg-surfacecolorOne step off the page: panels, table headers, the tab strip.
--color-bg-mutedcolorTwo steps off: the active sidebar item, inline code.
--color-bg-inversecolorThe opposite end of the ramp. Dark on a light page, light on a dark one.
--color-bordercolorHairlines and panel edges.
--color-border-strongcolorA border that has to be noticed — a hovered card, a focused field.
The accent
--color-accentcolorThe interactive color: links, active nav, focus rings, annotation markers.
--color-accent-hovercolorIts hover state.
--color-accent-oncolorText sitting on the accent. Check the contrast if you change either.
--color-accent-surfacecolorA tint of the accent: note callouts, the announcement bar, a soft band.
--color-accent-bordercolorA border on that tint.
Code
Code blocks stay dark in both themes, so these four don’t flip.
--color-code-bgcolorThe code panel.
--color-code-textcolorCode that carries no syntax color of its own.
--color-code-mutedcolorComments, and the prompt in a command line.
--color-code-bordercolorThe panel's edge, and the rule above a block's notes.
--color-code-highlightcolorA 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.
An unresolved token fails silently
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.