@unocss/preset-attributify 0.27.6 → 0.28.0

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 +2 -2
  2. package/package.json +12 -11
package/README.md CHANGED
@@ -13,9 +13,9 @@ import presetAttributify from '@unocss/preset-attributify'
13
13
 
14
14
  Unocss({
15
15
  presets: [
16
- presetAttributify({ /* options */ })
16
+ presetAttributify({ /* options */ }),
17
17
  // ...other presets
18
- ]
18
+ ],
19
19
  })
20
20
  ```
21
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-attributify",
3
- "version": "0.27.6",
3
+ "version": "0.28.0",
4
4
  "description": "Attributify preset for UnoCSS",
5
5
  "keywords": [
6
6
  "unocss",
@@ -11,17 +11,16 @@
11
11
  "url": "https://github.com/unocss/unocss/issues"
12
12
  },
13
13
  "license": "MIT",
14
+ "author": "Anthony Fu <anthonyfu117@hotmail.com>",
14
15
  "repository": {
15
16
  "type": "git",
16
17
  "url": "git+https://github.com/unocss/unocss.git",
17
18
  "directory": "packages/preset-attributify"
18
19
  },
19
20
  "funding": "https://github.com/sponsors/antfu",
20
- "author": "Anthony Fu <anthonyfu117@hotmail.com>",
21
- "sideEffects": false,
22
- "files": [
23
- "dist"
24
- ],
21
+ "main": "dist/index.cjs",
22
+ "module": "dist/index.mjs",
23
+ "types": "dist/index.d.ts",
25
24
  "exports": {
26
25
  ".": {
27
26
  "require": "./dist/index.cjs",
@@ -29,14 +28,16 @@
29
28
  "types": "./dist/index.d.ts"
30
29
  }
31
30
  },
32
- "main": "dist/index.cjs",
33
- "module": "dist/index.mjs",
34
- "types": "dist/index.d.ts",
31
+ "files": [
32
+ "dist"
33
+ ],
34
+ "sideEffects": false,
35
35
  "dependencies": {
36
- "@unocss/core": "0.27.6"
36
+ "@unocss/core": "0.28.0"
37
37
  },
38
38
  "scripts": {
39
39
  "build": "unbuild",
40
40
  "stub": "unbuild --stub"
41
- }
41
+ },
42
+ "readme": "# @unocss/preset-attributify\n\nAttributify Mode for [UnoCSS](https://github.com/unocss/unocss).\n\n## Installation\n\n```bash\nnpm i -D @unocss/preset-attributify\n```\n\n```ts\nimport presetAttributify from '@unocss/preset-attributify'\n\nUnocss({\n presets: [\n presetAttributify({ /* options */ }),\n // ...other presets\n ],\n})\n```\n\n## Attributify Mode\n\nThis preset enabled [Windi CSS's Attributify Mode](https://windicss.org/posts/v30.html#attributify-mode) for **other presets**.\n\nImagine you have this button using Tailwind's utilities. When the list gets long, it becomes really hard to read and maintain.\n\n```html\n<button class=\"bg-blue-400 hover:bg-blue-500 text-sm text-white font-mono font-light py-2 px-4 rounded border-2 border-blue-200 dark:bg-blue-500 dark:hover:bg-blue-600\">\n Button\n</button>\n```\n\nWith attributify mode, you can separate utilities into attributes:\n\n```html\n<button \n bg=\"blue-400 hover:blue-500 dark:blue-500 dark:hover:blue-600\"\n text=\"sm white\"\n font=\"mono light\"\n p=\"y-2 x-4\"\n border=\"2 rounded blue-200\"\n>\n Button\n</button>\n```\n\nFor example, `text-sm text-white` could be grouped into `text=\"sm white\"` without duplicating the same prefix.\n\n###### Valueless Attributify\n\nIn addition to Windi CSS's Attributify Mode, this presets also supports valueless attributes.\n\nFor example, \n\n```html\n<div class=\"m-2 rounded text-teal-400\" />\n```\n\nnow can be\n\n```html\n<div m-2 rounded text-teal-400 />\n```\n\n## Credits\n\nInitial idea by [@Tahul](https://github.com/Tahul) and [@antfu](https://github.com/antfu). Pior implementation in Windi CSS by [@voorjaar](https://github.com/voorjaar).\n\n## License\n\nMIT License © 2021-PRESENT [Anthony Fu](https://github.com/antfu)\n"
42
43
  }