unocss-astro-extending
Extend the UnoCSS (v66) engine with your own utility logic in an Astro (v6) project — the authoring reference. Covers the engine architecture and the createGenerator pipeline you build against, writing static and dynamic rules (regex matchers, body functions returning CSS objects or strings, ordering and meta), authoring custom variants (hover/dark/responsive-style modifiers and parametric variants that rewrite selectors), and defining shortcuts that fold many utilities into reusable named classes — the building blocks of a project-specific design-system vocabulary. Use when the official presets don't cover a utility you need, when designing a bespoke utility or shortcut vocabulary in uno.config.ts, or when you need to understand the generator internals to write rules, variants, or shortcuts correctly. For installation and uno.config.ts configuration see the unocss-astro-configuration skill; for using the built-in preset utilities day-to-day see the unocss-astro-usage skill.
- Version
- 66.x
Pinned to revision 7a07e3df018f, so it is the text this page describes rather than whatever the author pushed since.
Files
- skills/unocss-astro-extending/SKILL.md
- skills/unocss-astro-extending/references/core-architecture.md
- skills/unocss-astro-extending/references/core-rules.md
- skills/unocss-astro-extending/references/core-shortcuts.md
- skills/unocss-astro-extending/references/core-variants.md
Every link opens the file at its source, pinned to the revision this page describes.