中文文档下载地址:
- https://github.com/Richard-Zhang1019/unocss-docs-cn
- vitepress v1.0.0-rc.31
node环境
node >=16 推荐:node 16.18.0
文档打包
pnpm docs:build
配置文件
- .vitepress/config.ts 配置文件
- public/main.js 统计代码
UnoCSS
The instant on-demand Atomic CSS engine.
💡 I highly recommend reading this blog post -
Reimagine Atomic CSS
for the story behind
📚 Documentation | 🧑💻 Interactive Docs | 🤹♂️ Playground
Features
Inspired by Windi CSS, Tailwind CSS, and Twind, but:
- Fully customizable - no core utilities, all functionalities are provided via presets.
- No parsing, no AST, no scanning, it's INSTANT (5x faster than Windi CSS or Tailwind JIT).
- ~6kb min+brotli - zero deps and browser friendly.
- Shortcuts - aliasing utilities, dynamically.
- Attributify mode - group utilities in attributes.
- Pure CSS Icons - use any icon as a single class.
- Variant Groups - shorthand for group utils with common prefixes.
- CSS Directives - reuse utils in CSS with
@applydirective. - Compilation mode - synthesizes multiple classes into one at build time.
- Inspector - inspect and debug interactively.
- CSS-in-JS Runtime build - use UnoCSS with one line of CDN import.
- VS Code extension
- Code-splitting for CSS - ships minimal CSS for MPA.
Documentation
Read the documentation for more details.
Installation
Acknowledgement
UnoCSS is made possible thanks to the inspirations from the following projects:
in alphabet order