UnoCSS Configuration
Colours
Two sources, and only two:
- The UI library's tokens —
theme.colorsmaps everyUiTokento its own custom property (var(--ui-accent)), which Vuetify 0's theme plugin writes per theme, so abg-*,text-*orb-*utility follows the selected theme at runtime. A new colour is a new token inUiPaletteMap(apps/web/configuration/UiPaletteMap.ts), never an entry of its own inuno.config.ts(theui-libraryskill,references/tokens.md). - preset-wind4's own palette (
text-amber,bg-sky), for what no token says. Nothing registers it; it is the preset's.
Nothing is safelisted
A utility is generated only from what the extractor reads, and a :class literal is read like an attribute — :class="isActive ? 'bg-accent' : 'bg-panel'" generates both. So a class is written whole in the file that uses it rather than assembled at runtime and safelisted to cover the gap (the ui-library skill, references/icons.md). A safelist entry would also come back in matched from every uno.generate(token), whatever the token was, and apps/web/app/templates.test.ts asks whether a token is a utility by looking it up in matched — so a caller there looks the token up rather than counting the set.
CSS layer name mapping
Every layer but properties is uno-<layer>, and apps/web/app/assets/css/layers.css orders them chrome first, utilities last (references/css-layers.md).
Every template scanned at startup
Every .vue under app/, and every .ts carrying @unocss-include, is scanned at dev startup, and a template comment is blanked before attributify reads it (references/extraction.md).
Shortcuts for recurring utility pairs
When the same attributify utility combination recurs across components, define a named shortcut in uno.config.ts and use it everywhere instead of the raw pair, as the library's ui-* shortcuts do. Adding one moves the resolved-config snapshot (references/config-snapshot.md).
One spelling per utility — the blocklist
BLOCKED_SPELLINGS in uno.config.ts is the one source of which spelling is canonical — unocss/blocklist reports the rest (references/blocklist.md).
The resolved-config snapshot
uno.config.test.ts snapshots the resolved config so an unocss bump shows what upstream moved — read the diff before regenerating (references/config-snapshot.md).
Reference pages
references/css-layers.md— when changing the layer mapping, or a utility loses to a rule it should beat.references/extraction.md— when dev styling differs from a reload, a.tsnames a utility, or a comment seems to break an attribute.references/blocklist.md— when two spellings of a utility both work, or one is being blocked.references/config-snapshot.md— whenuno.config.test.tsfails, most of all after a bump.