Comparing version 0.6.6 to 0.7.2
{ | ||
"name": "unocss", | ||
"version": "0.6.6", | ||
"version": "0.7.2", | ||
"description": "The instant on-demand Atomic CSS engine.", | ||
@@ -43,8 +43,8 @@ "keywords": [ | ||
"dependencies": { | ||
"@unocss/core": "0.6.6", | ||
"@unocss/reset": "0.6.6", | ||
"@unocss/preset-icons": "0.6.6", | ||
"@unocss/preset-attributify": "0.6.6", | ||
"@unocss/preset-uno": "0.6.6", | ||
"@unocss/vite": "0.6.6" | ||
"@unocss/core": "0.7.2", | ||
"@unocss/reset": "0.7.2", | ||
"@unocss/preset-icons": "0.7.2", | ||
"@unocss/preset-attributify": "0.7.2", | ||
"@unocss/preset-uno": "0.7.2", | ||
"@unocss/vite": "0.7.2" | ||
}, | ||
@@ -51,0 +51,0 @@ "engines": { |
@@ -1,13 +0,24 @@ | ||
# UnoCSS | ||
<br> | ||
<p align="center"> | ||
<img src="https://raw.githubusercontent.com/antfu/unocss/main/playground/public/icon-gray.svg" style="width:100px;" /> | ||
</p> | ||
<h1 align="center">UnoCSS</h1> | ||
<p align="center"> | ||
The instant on-demand Atomic CSS engine. | ||
</p> | ||
[![NPM version](https://img.shields.io/npm/v/unocss?color=a1b858&label=)](https://www.npmjs.com/package/unocss) | ||
<p align="center"> | ||
<a href="https://www.npmjs.com/package/unocss"><img src="https://img.shields.io/npm/v/unocss?color=c95f8b&label=" alt="NPM version"></a></p> | ||
> 💡 I highly recommend reading this blog post - [**Reimagine Atomic CSS**](https://antfu.me/posts/reimagine-atomic-css) for the story behind this tool. | ||
<blockquote align="center"> | ||
<p>💡 I highly recommend reading this blog post - <br><a href="https://antfu.me/posts/reimagine-atomic-css"><strong>Reimagine Atomic CSS</strong></a><br>for the story behind</p> | ||
</blockquote> | ||
###### Try it! | ||
<br> | ||
<p align="center"><a href="https://unocss.antfu.me/">🤹♂️ Online Playground</a></p> | ||
<br> | ||
[🤹♂️ Online Playground](https://unocss.antfu.me/) | ||
## Features | ||
@@ -19,6 +30,8 @@ | ||
- No parsing, no AST, no scanning, it's **INSTANT** (200x faster than Windi CSS or Tailwind JIT) | ||
- <3kb min+gzip - zero deps and browser friendly. | ||
- ~3.5kb min+gzip - zero deps and browser friendly. | ||
- [Shortcuts](#shortcuts) - aliasing utilities, dynamically. | ||
- [Attributify Mode](https://github.com/antfu/unocss/tree/main/packages/preset-attributify/) - group utilities in attributes | ||
- [Pure CSS Icons](https://github.com/antfu/unocss/tree/main/packages/preset-icons/) - use any icon as a single class. | ||
- [Inspector](#inspector) - inspect and debug interatively. | ||
- [CSS-in-JS Runtime version](https://github.com/antfu/unocss/tree/main/packages/runtime) | ||
- [CSS Scoping](#css-scoping) | ||
@@ -393,2 +406,29 @@ - Code-splitting for CSS - ships minimal CSS for MPA. | ||
### Extend Theme | ||
UnoCSS also supports the theming system that you might be familiar with in Tailwind / Windi. At the user level, you can specify the `theme` property in your config and it will be deep merged to the default theme. | ||
```ts | ||
theme: { | ||
colors: { | ||
'very-cool': '#0000ff', | ||
}, | ||
breakpoints: { | ||
xs: '320px', | ||
sm: '640px', | ||
} | ||
} | ||
``` | ||
To consume the theme in rules: | ||
```ts | ||
rules: [ | ||
[/^text-(.*)$/, ([, c], { theme }) => { | ||
if (theme.colors[c]) | ||
return { color: theme.colors[c] } | ||
}] | ||
] | ||
``` | ||
### Layers | ||
@@ -443,2 +483,12 @@ | ||
### Inspector | ||
From v0.7.0, our Vite plugin now ships with a dev inspector ([@unocss/inspector](https://github.com/antfu/unocss/tree/main/packages/inspector)) for you to view, play and analyse your custom rules and setup. Visit `http://localhost:3000/__unocss` in your Vite dev server to see it. | ||
<img src="https://user-images.githubusercontent.com/11247099/140885990-1827f5ce-f12a-4ed4-9d63-e5145a65fb4a.png"> | ||
### Runtime (CSS-in-JS) | ||
See [@unocss/runtime](https://github.com/antfu/unocss/tree/main/packages/runtime) | ||
### CSS Scoping | ||
@@ -445,0 +495,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22782
531
+ Added@polka/url@1.0.0-next.25(transitive)
+ Added@unocss/config@0.7.2(transitive)
+ Added@unocss/core@0.7.2(transitive)
+ Added@unocss/inspector@0.7.2(transitive)
+ Added@unocss/preset-attributify@0.7.2(transitive)
+ Added@unocss/preset-icons@0.7.2(transitive)
+ Added@unocss/preset-uno@0.7.2(transitive)
+ Added@unocss/reset@0.7.2(transitive)
+ Added@unocss/scope@0.7.2(transitive)
+ Added@unocss/vite@0.7.2(transitive)
+ Addedduplexer@0.1.2(transitive)
+ Addedgzip-size@6.0.0(transitive)
+ Addedmrmime@1.0.1(transitive)
+ Addedsirv@1.0.19(transitive)
+ Addedtotalist@1.1.0(transitive)
- Removed@unocss/config@0.6.6(transitive)
- Removed@unocss/core@0.6.6(transitive)
- Removed@unocss/preset-attributify@0.6.6(transitive)
- Removed@unocss/preset-icons@0.6.6(transitive)
- Removed@unocss/preset-uno@0.6.6(transitive)
- Removed@unocss/reset@0.6.6(transitive)
- Removed@unocss/scope@0.6.6(transitive)
- Removed@unocss/vite@0.6.6(transitive)
Updated@unocss/core@0.7.2
Updated@unocss/preset-icons@0.7.2
Updated@unocss/preset-uno@0.7.2
Updated@unocss/reset@0.7.2
Updated@unocss/vite@0.7.2