{"_id":"@csstools/postcss-color-function-display-p3-linear@2.0.12","bugs":{"url":"https://github.com/csstools/postcss-plugins/issues"},"dist":{"shasum":"6e5d2c769c0412517a478bc23a87945fb29f5411","tarball":"http://registry-npm.ywwl.com/@csstools/postcss-color-function-display-p3-linear/download/@csstools/postcss-color-function-display-p3-linear-2.0.12.tgz","fileCount":6,"integrity":"sha512-l62tzRpit0wUcXX59yDlG+ZvjzipGKYwu89Nw8SMk32DVW8p6+4xoLGdhIUtqudebd8EtiTiod4w/IatETWa3g==","signatures":[{"sig":"MEYCIQCUN/bGS9/xVeBSgKZWVHtALVEFj3Ce8KTL6wuoC66DEQIhAP4wwvUEBq1o+uQsNurDlV+P+C/l25zuJr4aBB2aXym0","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCdvDfaOgPYrif0QnksypBpn38YogmTDbORndBVQ2QEGgIgP1gIZ7FzJf7zHvw46ZM9uHIKfCDx7DGbY2Y/VdAR0Pg="}],"unpackedSize":8472,"size":3200,"noattachment":false,"key":"/@csstools/postcss-color-function-display-p3-linear/-/@csstools/postcss-color-function-display-p3-linear-2.0.12.tgz"},"name":"@csstools/postcss-color-function-display-p3-linear","type":"module","engines":{"node":">=20.19.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"}},"funding":[{"url":"https://github.com/sponsors/csstools","type":"github"},{"url":"https://opencollective.com/csstools","type":"opencollective"}],"gitHead":"1c228c89142947813a7ff0564b567960ecb118ec","license":"MIT-0","scripts":{},"version":"2.0.12","_npmUser":{"name":"romainmenke","email":"romainmenke@gmail.com"},"homepage":"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-function-display-p3-linear#readme","keywords":["color","css","display-p3-linear","postcss","postcss-plugin","syntax"],"repository":{"url":"git+https://github.com/csstools/postcss-plugins.git","type":"git","directory":"plugins/postcss-color-function-display-p3-linear"},"_npmVersion":"11.13.0","description":"Use the display-p3-linear color space on the color() function in CSS","directories":{},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},{"name":"alaguna","email":"sombragriselros@gmail.com"},{"name":"romainmenke","email":"romainmenke@gmail.com"}],"_nodeVersion":"26.1.0","contributors":[{"name":"Romain Menke","email":"romainmenke@gmail.com"}],"dependencies":{"@csstools/utilities":"^3.0.0","@csstools/css-tokenizer":"^4.0.0","@csstools/css-color-parser":"^4.2.3","@csstools/css-parser-algorithms":"^4.0.0","@csstools/postcss-progressive-custom-properties":"^5.1.3"},"_hasShrinkwrap":false,"peerDependencies":{"postcss":"^8.4"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/postcss-color-function-display-p3-linear_2.0.12_1789286680022_0.42564203484746654"},"readme":"# PostCSS Color Function Display P3 Linear [<img src=\"https://postcss.github.io/postcss/logo.svg\" alt=\"PostCSS Logo\" width=\"90\" height=\"90\" align=\"right\">][PostCSS]\n\n`npm install @csstools/postcss-color-function-display-p3-linear --save-dev`\n\n[PostCSS Color Function Display P3 Linear] lets you use the `display-p3-linear` color space in the `color` function in\nCSS, following the [CSS Color] specification.\n\n```css\n.color {\n\tcolor: color(display-p3-linear 0.3081 0.014 0.0567);\n}\n\n:root {\n\t--a-color: color(display-p3-linear 0.3081 0.014 0.0567);\n}\n\n/* becomes */\n\n.color {\n\tcolor: color(display-p3 0.59096 0.12316 0.26409);\n}\n\n:root {\n\t--a-color: color(display-p3 0.59096 0.12316 0.26409);\n}\n```\n\n## Usage\n\nAdd [PostCSS Color Function Display P3 Linear] to your project:\n\n```bash\nnpm install postcss @csstools/postcss-color-function-display-p3-linear --save-dev\n```\n\nUse it as a [PostCSS] plugin:\n\n```js\nconst postcss = require('postcss');\nconst postcssColorFunctionDisplayP3Linear = require('@csstools/postcss-color-function-display-p3-linear');\n\npostcss([\n\tpostcssColorFunctionDisplayP3Linear(/* pluginOptions */)\n]).process(YOUR_CSS /*, processOptions */);\n```\n\n\n\n## Options\n\n### preserve\n\nThe `preserve` option determines whether the original notation\nis preserved. By default, it is not preserved.\n\n```js\npostcssColorFunctionDisplayP3Linear({ preserve: true })\n```\n\n```css\n.color {\n\tcolor: color(display-p3-linear 0.3081 0.014 0.0567);\n}\n\n:root {\n\t--a-color: color(display-p3-linear 0.3081 0.014 0.0567);\n}\n\n/* becomes */\n\n.color {\n\tcolor: color(display-p3 0.59096 0.12316 0.26409);\n\tcolor: color(display-p3-linear 0.3081 0.014 0.0567);\n}\n\n:root {\n\t--a-color: color(display-p3 0.59096 0.12316 0.26409);\n}\n\n@supports (color: color(display-p3-linear 0 0 0)) {\n:root {\n\t--a-color: color(display-p3-linear 0.3081 0.014 0.0567);\n}\n}\n```\n\n### enableProgressiveCustomProperties\n\nThe `enableProgressiveCustomProperties` option determines whether the original notation\nis wrapped with `@supports` when used in Custom Properties. By default, it is enabled.\n\n> [!NOTE]\n> We only recommend disabling this when you set `preserve` to `false` or if you bring your own fix for Custom Properties.  \n> See what the plugin does in its [README](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties#readme).\n\n```js\npostcssColorFunctionDisplayP3Linear({ enableProgressiveCustomProperties: false })\n```\n\n```css\n.color {\n\tcolor: color(display-p3-linear 0.3081 0.014 0.0567);\n}\n\n:root {\n\t--a-color: color(display-p3-linear 0.3081 0.014 0.0567);\n}\n\n/* becomes */\n\n.color {\n\tcolor: color(display-p3 0.59096 0.12316 0.26409);\n\tcolor: color(display-p3-linear 0.3081 0.014 0.0567);\n}\n\n:root {\n\t--a-color: color(display-p3 0.59096 0.12316 0.26409);\n\t--a-color: color(display-p3-linear 0.3081 0.014 0.0567);\n}\n```\n\n_Custom properties do not fallback to the previous declaration_\n\n## Copyright : color conversions\n\nThis software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/tree/main/css-color-4. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).\n\n[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test\n[css-url]: https://cssdb.org/#color-function-display-p3-linear\n[discord]: https://discord.gg/bUadyRwkJS\n[npm-url]: https://www.npmjs.com/package/@csstools/postcss-color-function-display-p3-linear\n\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS Color Function Display P3 Linear]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-function-display-p3-linear\n[CSS Color]: https://drafts.csswg.org/css-color-4/#predefined-display-p3-linear\n","publish_time":1789286680113,"_cnpm_publish_time":1789286680113,"dist-tags":{"latest":"2.0.17"}}