{"name":"@csstools/postcss-color-function-display-p3-linear","version":"2.0.9","keywords":["color","css","display-p3-linear","postcss","postcss-plugin","syntax"],"license":"MIT-0","_id":"@csstools/postcss-color-function-display-p3-linear@2.0.9","maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},{"name":"alaguna","email":"sombragriselros@gmail.com"},{"name":"romainmenke","email":"romainmenke@gmail.com"}],"contributors":[{"name":"Romain Menke","email":"romainmenke@gmail.com"}],"homepage":"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-function-display-p3-linear#readme","bugs":{"url":"https://github.com/csstools/postcss-plugins/issues"},"dist":{"shasum":"76693cbdfd38e6cfc87d2569b8874da0835c1958","tarball":"http://registry-npm.ywwl.com/@csstools/postcss-color-function-display-p3-linear/download/@csstools/postcss-color-function-display-p3-linear-2.0.9.tgz","fileCount":6,"integrity":"sha512-IqPfcNZCGt0xiSu+QJxpSurOgql1ltOraGOp98h4+79yzrSO2bvV4HH4NtQ3DlxFtdsDZHv78gtRtJ5sIypocA==","signatures":[{"sig":"MEUCIAT7CBerm4TmarQ6s9B2Cb7cxN7sRgosclRYdcX+jmbsAiEA/ZaRc368g2MCdxWPsWWHX276jf29ILMlbDaIBM93NvY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCi+sMkuy60eYTnUVNtMXfiJXRF3LhCdvRytNsFaottFQIhAKXtXwvUjfULY4IxayVneFlUWbgNhylz9YvxfGy9brWk","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8467,"size":3198,"noattachment":false,"key":"/@csstools/postcss-color-function-display-p3-linear/-/@csstools/postcss-color-function-display-p3-linear-2.0.9.tgz"},"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":"e2ab07e3296c6f8906b4841fb6d30dbc9c40ae29","scripts":{},"_npmUser":{"name":"romainmenke","email":"romainmenke@gmail.com"},"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":{},"_nodeVersion":"26.1.0","dependencies":{"@csstools/utilities":"^3.0.0","@csstools/css-tokenizer":"^4.0.0","@csstools/css-color-parser":"^4.2.1","@csstools/css-parser-algorithms":"^4.0.0","@csstools/postcss-progressive-custom-properties":"^5.1.2"},"_hasShrinkwrap":false,"peerDependencies":{"postcss":"^8.4"},"_npmOperationalInternal":{"tmp":"tmp/postcss-color-function-display-p3-linear_2.0.9_1787673260938_0.030188233170304057","host":"s3://npm-registry-packages-npm-production"},"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":1787673261069,"_cnpm_publish_time":1787673261069,"dist-tags":{"latest":"2.0.17"}}