Socket
Socket
Sign inDemoInstall

@unocss/transformer-directives

Package Overview
Dependencies
Maintainers
1
Versions
250
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unocss/transformer-directives - npm Package Compare versions

Comparing version 0.34.1 to 0.35.0

6

dist/index.d.ts

@@ -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;

34

package.json
{
"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 &copy; 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc