Component token audit

This audit moves repeated visual decisions into tokens before component work makes them harder to change consistently. It is a migration record, not permission to tokenize every local measurement.

Completed migrations#

Repeated decisionSemantic token or roleConsumers
Surface, text, and divider colourscolor.paper, color.ink, color.line, neutral scaleHeader, navigation, pagination, code and keyboard controls
Status treatmentstatus.note, status.success, status.important, status.warning, status.danger, status.archivedMarkdown callouts and version badges
Corner treatmentradius.*, diagram.radiusCode, callouts, keyboard controls, image and diagram surfaces
Elevationshadow.panel, shadow.overlay, diagram.shadowPreviews, submenus, pagination, code, keyboard controls, mindmap cards
Motionduration.fast, duration.standard, easing.standardMindmap preview transitions and future interactive components
Component geometrycomponent.theme-toggle.*Shared theme toggle in both site headers

Audit rule#

Move a value into a token when it names a reusable role, appears in more than one component, or must stay aligned across sites and exported diagrams. Keep local geometry in CSS when it only explains one layout relationship.

The token checker rejects raw colour literals and ungoverned Tailwind palette utilities in assets/css/site.css. Template migrations should prefer an existing semantic utility or a named component class; they must not introduce a new literal only to avoid changing the token source.