unocss 0.11.1 → 0.11.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +13 -1
  2. package/package.json +8 -8
package/README.md CHANGED
@@ -112,7 +112,7 @@ Presets are the heart of UnoCSS that lets you make your own custom framework in
112
112
  ###### Official Presets
113
113
 
114
114
  - [@unocss/preset-uno](https://github.com/antfu/unocss/tree/main/packages/preset-uno) - The default preset.
115
- - [@unocss/preset-attributify](https://github.com/antfu/unocss/tree/main/packages/preset-attributify) - Provides [Attributify Mode](#attributify-mode) to other presets and rules.
115
+ - [@unocss/preset-attributify](https://github.com/antfu/unocss/tree/main/packages/preset-attributify) - Provides [Attributify Mode](https://github.com/antfu/unocss/tree/main/packages/preset-attributify#attributify-mode) to other presets and rules.
116
116
  - [@unocss/preset-icons](https://github.com/antfu/unocss/tree/main/packages/preset-icons) - Use any icon as a class utility.
117
117
 
118
118
  ###### Community Presets
@@ -488,6 +488,18 @@ import './my-custom.css'
488
488
  import 'uno:utilities.css'
489
489
  ```
490
490
 
491
+ ### Utilities Preprocess & Prefixing
492
+
493
+ UnoCSS also provides the ability to preprocess and transform extracted utilities before processing to the matcher. For example, the following example allows you to add a global prefix to all utilities:
494
+
495
+ ```ts
496
+ preprocess(matcher) {
497
+ return matcher.startsWith('prefix-')
498
+ ? matcher.slice(7)
499
+ : undefined // ignore
500
+ }
501
+ ```
502
+
491
503
  ### Inspector
492
504
 
493
505
  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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unocss",
3
- "version": "0.11.1",
3
+ "version": "0.11.5",
4
4
  "description": "The instant on-demand Atomic CSS engine.",
5
5
  "keywords": [
6
6
  "unocss",
@@ -40,13 +40,13 @@
40
40
  "*.d.ts"
41
41
  ],
42
42
  "dependencies": {
43
- "@unocss/core": "0.11.1",
44
- "@unocss/cli": "0.11.1",
45
- "@unocss/reset": "0.11.1",
46
- "@unocss/preset-icons": "0.11.1",
47
- "@unocss/preset-attributify": "0.11.1",
48
- "@unocss/preset-uno": "0.11.1",
49
- "@unocss/vite": "0.11.1"
43
+ "@unocss/core": "0.11.5",
44
+ "@unocss/cli": "0.11.5",
45
+ "@unocss/reset": "0.11.5",
46
+ "@unocss/preset-icons": "0.11.5",
47
+ "@unocss/preset-attributify": "0.11.5",
48
+ "@unocss/preset-uno": "0.11.5",
49
+ "@unocss/vite": "0.11.5"
50
50
  },
51
51
  "engines": {
52
52
  "node": ">=14"