@unocss/transformer-directives
Advanced tools
Comparing version 0.34.1 to 0.35.0
@@ -14,2 +14,8 @@ import { SourceCodeTransformer, UnoGenerator } from '@unocss/core'; | ||
varStyle?: false | string; | ||
/** | ||
* Throw an error if utils or themes are not found. | ||
* | ||
* @default true | ||
*/ | ||
throwOnMissing?: boolean; | ||
} | ||
@@ -16,0 +22,0 @@ declare function transformerDirectives(options?: TransformerDirectivesOptions): SourceCodeTransformer; |
{ | ||
"name": "@unocss/transformer-directives", | ||
"version": "0.34.1", | ||
"version": "0.35.0", | ||
"description": "UnoCSS transformer for `@apply` directive", | ||
"keywords": [ | ||
"unocss", | ||
"unocss-transformer" | ||
], | ||
"author": "hannoeru <me@hanlee.co>", | ||
"license": "MIT", | ||
"homepage": "https://github.com/antfu/unocss/tree/main/packages/transformer-directives#readme", | ||
"bugs": { | ||
"url": "https://github.com/antfu/unocss/issues" | ||
}, | ||
"license": "MIT", | ||
"author": "hannoeru <me@hanlee.co>", | ||
"repository": { | ||
@@ -20,17 +13,24 @@ "type": "git", | ||
}, | ||
"main": "./dist/index.cjs", | ||
"module": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts", | ||
"bugs": { | ||
"url": "https://github.com/antfu/unocss/issues" | ||
}, | ||
"keywords": [ | ||
"unocss", | ||
"unocss-transformer" | ||
], | ||
"sideEffects": false, | ||
"exports": { | ||
".": { | ||
"require": "./dist/index.cjs", | ||
"import": "./dist/index.mjs" | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.cjs" | ||
} | ||
}, | ||
"main": "./dist/index.cjs", | ||
"module": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"sideEffects": false, | ||
"dependencies": { | ||
"@unocss/core": "0.34.1", | ||
"@unocss/core": "0.35.0", | ||
"css-tree": "^2.1.0" | ||
@@ -37,0 +37,0 @@ }, |
@@ -5,3 +5,3 @@ # @unocss/transformer-directives | ||
UnoCSS transformer for `@apply` directive | ||
UnoCSS transformer for `@apply` and `theme()` directive | ||
@@ -29,2 +29,4 @@ ## Install | ||
### `@apply` | ||
```css | ||
@@ -49,3 +51,3 @@ .custom-div { | ||
### CSS Variable Style | ||
#### CSS Variable Style | ||
@@ -78,4 +80,22 @@ To be compatible with vanilla CSS, you can use CSS Variables to replace the `@apply` directive. | ||
### `theme()` | ||
Use the `theme()` function to access your theme config values using dot notation. | ||
```css | ||
.btn-blue { | ||
background-color: theme('colors.blue.500'); | ||
} | ||
``` | ||
Will be compiled to: | ||
```css | ||
.btn-blue { | ||
background-color: #3b82f6; | ||
} | ||
``` | ||
## License | ||
MIT License © 2022-PRESENT [hannoeru](https://github.com/hannoeru) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
14942
277
98
+ Added@unocss/core@0.35.0(transitive)
- Removed@unocss/core@0.34.1(transitive)
Updated@unocss/core@0.35.0