postcss-color-functional-notation
Advanced tools
Comparing version 5.0.2 to 5.1.0
# Changes to PostCSS Color Functional Notation | ||
### 5.1.0 (June 1, 2023) | ||
- Added `@csstools/postcss-progressive-custom-properties` for improved support of custom properties. | ||
- Updated `@csstools/postcss-progressive-custom-properties` to `2.3.0` (minor) | ||
### 5.0.2 (February 6, 2023) | ||
@@ -4,0 +10,0 @@ |
@@ -6,5 +6,6 @@ import type { PluginCreator } from 'postcss'; | ||
preserve?: boolean; | ||
/** Enable "@csstools/postcss-progressive-custom-properties". default: true */ | ||
enableProgressiveCustomProperties?: boolean; | ||
}; | ||
/** Transform lab() and lch() functions in CSS. */ | ||
declare const postcssPlugin: PluginCreator<pluginOptions>; | ||
export default postcssPlugin; |
{ | ||
"name": "postcss-color-functional-notation", | ||
"description": "Use space and slash separated color notation in CSS", | ||
"version": "5.0.2", | ||
"version": "5.1.0", | ||
"author": "Jonathan Neal <jonathantneal@hotmail.com>", | ||
"license": "CC0-1.0", | ||
"funding": { | ||
"type": "opencollective", | ||
"url": "https://opencollective.com/csstools" | ||
}, | ||
"funding": [ | ||
{ | ||
"type": "github", | ||
"url": "https://github.com/sponsors/csstools" | ||
}, | ||
{ | ||
"type": "opencollective", | ||
"url": "https://opencollective.com/csstools" | ||
} | ||
], | ||
"engines": { | ||
@@ -32,2 +38,3 @@ "node": "^14 || ^16 || >=18" | ||
"dependencies": { | ||
"@csstools/postcss-progressive-custom-properties": "^2.3.0", | ||
"postcss-value-parser": "^4.2.0" | ||
@@ -38,13 +45,11 @@ }, | ||
}, | ||
"devDependencies": { | ||
"@csstools/postcss-tape": "*" | ||
}, | ||
"scripts": { | ||
"prebuild": "npm run clean", | ||
"build": "rollup -c ../../rollup/default.mjs", | ||
"clean": "node -e \"fs.rmSync('./dist', { recursive: true, force: true }); fs.mkdirSync('./dist');\"", | ||
"docs": "node ../../.github/bin/generate-docs/install.mjs", | ||
"lint": "npm run lint:eslint && npm run lint:package-json", | ||
"lint:eslint": "eslint ./src --ext .js --ext .ts --ext .mjs --no-error-on-unmatched-pattern", | ||
"lint:package-json": "node ../../.github/bin/format-package-json.mjs", | ||
"prepublishOnly": "npm run clean && npm run build && npm run test", | ||
"test": "node .tape.mjs && npm run test:exports", | ||
"test:exports": "node ./test/_import.mjs && node ./test/_require.cjs", | ||
"lint": "node ../../.github/bin/format-package-json.mjs", | ||
"prepublishOnly": "npm run build && npm run test", | ||
"test": "node .tape.mjs && node ./test/_import.mjs && node ./test/_require.cjs", | ||
"test:rewrite-expects": "REWRITE_EXPECTS=true node .tape.mjs" | ||
@@ -51,0 +56,0 @@ }, |
@@ -61,3 +61,3 @@ # PostCSS Color Functional Notation [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][postcss] | ||
```js | ||
postcssImageSetFunction({ preserve: true }) | ||
postcssColorFunctionalNotation({ preserve: true }) | ||
``` | ||
@@ -87,2 +87,13 @@ | ||
### enableProgressiveCustomProperties | ||
The `enableProgressiveCustomProperties` option determines whether the original notation | ||
is wrapped with `@supports` when used in Custom Properties. By default, it is enabled. | ||
⚠️ We only recommend disabling this when you set `preserve` to `false` or if you bring your own fix for Custom Properties. See what the plugin does in its [README](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties#readme). | ||
```js | ||
postcssColorFunctionalNotation({ enableProgressiveCustomProperties: false }) | ||
``` | ||
[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test | ||
@@ -89,0 +100,0 @@ [css-url]: https://cssdb.org/#color-functional-notation |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
27728
63
108
3
1