{"name":"@csstools/postcss-hwb-function","version":"3.0.17","keywords":["color","css","design","hwb","notation","postcss","postcss-plugin","syntax"],"license":"MIT-0","_id":"@csstools/postcss-hwb-function@3.0.17","contributors":[{"url":"https://antonio.laguna.es","name":"Antonio Laguna","email":"antonio@laguna.es"},{"name":"Romain Menke","email":"romainmenke@gmail.com"}],"homepage":"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-hwb-function#readme","bugs":{"url":"https://github.com/csstools/postcss-plugins/issues"},"dist":{"shasum":"d0b33d6d57a49edd8767a2b7eb31e97b4df89f90","tarball":"http://registry-npm.ywwl.com/@csstools/postcss-hwb-function/download/@csstools/postcss-hwb-function-3.0.17.tgz","fileCount":7,"integrity":"sha512-Oe8WBtP29K5EBCqOKOfKAUaDFWYw+16WCDuwaYJMS0o8oZdPwmxLaBDsqXlNK03zXe9McYBli8fBHyRiVEVJGQ==","signatures":[{"sig":"MEUCIHJO5jeCuYsZLidRUuYAHmv1fdt6W2bEGTNKxUhxvAtBAiEAknrqZq+lgNLF2Fchp7UoHREpddjrpBkfMzG+NXgfo2A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10713,"size":3566,"noattachment":false,"key":"/@csstools/postcss-hwb-function/-/@csstools/postcss-hwb-function-3.0.17.tgz"},"main":"dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"dist/index.mjs","engines":{"node":"^14 || ^16 || >=18"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"default":"./dist/index.cjs"}}},"funding":[{"url":"https://github.com/sponsors/csstools","type":"github"},{"url":"https://opencollective.com/csstools","type":"opencollective"}],"gitHead":"3ca7edfa753680a2cba5604e2102968c0e8cfa89","scripts":{},"_npmUser":{"name":"romainmenke","email":"romainmenke@gmail.com"},"repository":{"url":"git+https://github.com/csstools/postcss-plugins.git","type":"git","directory":"plugins/postcss-hwb-function"},"_npmVersion":"10.7.0","description":"Use hwb() color functions in CSS","directories":{},"_nodeVersion":"22.1.0","dependencies":{"@csstools/utilities":"^1.0.0","@csstools/css-tokenizer":"^2.4.1","@csstools/css-color-parser":"^2.0.4","@csstools/css-parser-algorithms":"^2.7.1","@csstools/postcss-progressive-custom-properties":"^3.2.0"},"_hasShrinkwrap":false,"peerDependencies":{"postcss":"^8.4"},"_npmOperationalInternal":{"tmp":"tmp/postcss-hwb-function_3.0.17_1720258814858_0.14098139471926152","host":"s3://npm-registry-packages"},"readme":"# PostCSS HWB Function [<img src=\"https://postcss.github.io/postcss/logo.svg\" alt=\"PostCSS Logo\" width=\"90\" height=\"90\" align=\"right\">][PostCSS]\n\n[<img alt=\"npm version\" src=\"https://img.shields.io/npm/v/@csstools/postcss-hwb-function.svg\" height=\"20\">][npm-url] [<img alt=\"Build Status\" src=\"https://github.com/csstools/postcss-plugins/workflows/test/badge.svg\" height=\"20\">][cli-url] [<img alt=\"Discord\" src=\"https://shields.io/badge/Discord-5865F2?logo=discord&logoColor=white\">][discord]<br><br>[<img alt=\"Baseline Status\" src=\"https://cssdb.org/images/badges-baseline/hwb-function.svg\" height=\"20\">][css-url] [<img alt=\"CSS Standard Status\" src=\"https://cssdb.org/images/badges/hwb-function.svg\" height=\"20\">][css-url] \n\n```bash\nnpm install @csstools/postcss-hwb-function --save-dev\n```\n\n[PostCSS HWB Function] lets you use the `hwb()` color function in CSS, following [CSS Color Module 4].\n\n```pcss\na {\n\tcolor: hwb(194 0% 0%);\n}\n\nb {\n\tcolor: hwb(194 0% 0% / .5);\n}\n\n/* becomes */\n\na {\n\tcolor: rgb(0, 196, 255);\n}\n\nb {\n\tcolor: rgba(0, 196, 255, 0.5);\n}\n```\n\n## Usage\n\nAdd [PostCSS HWB Function] to your project:\n\n```bash\nnpm install postcss @csstools/postcss-hwb-function --save-dev\n```\n\nUse it as a [PostCSS] plugin:\n\n```js\nconst postcss = require('postcss');\nconst postcssHWBFunction = require('@csstools/postcss-hwb-function');\n\npostcss([\n\tpostcssHWBFunction(/* pluginOptions */)\n]).process(YOUR_CSS /*, processOptions */);\n```\n\n[PostCSS HWB Function] runs in all Node environments, with special\ninstructions for:\n\n- [Node](INSTALL.md#node)\n- [PostCSS CLI](INSTALL.md#postcss-cli)\n- [PostCSS Load Config](INSTALL.md#postcss-load-config)\n- [Webpack](INSTALL.md#webpack)\n- [Next.js](INSTALL.md#nextjs)\n- [Gulp](INSTALL.md#gulp)\n- [Grunt](INSTALL.md#grunt)\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\npostcssHWBFunction({ preserve: true })\n```\n\n```pcss\na {\n\tcolor: hwb(194 0% 0%);\n}\n\nb {\n\tcolor: hwb(194 0% 0% / .5);\n}\n\n/* becomes */\n\na {\n\tcolor: rgb(0, 196, 255);\n\tcolor: hwb(194 0% 0%);\n}\n\nb {\n\tcolor: rgba(0, 196, 255, 0.5);\n\tcolor: hwb(194 0% 0% / .5);\n}\n```\n\n[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test\n[css-url]: https://cssdb.org/#hwb-function\n[discord]: https://discord.gg/bUadyRwkJS\n[npm-url]: https://www.npmjs.com/package/@csstools/postcss-hwb-function\n\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS HWB Function]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-hwb-function\n[CSS Color Module 4]: https://www.w3.org/TR/css-color-4/#the-hwb-notation\n","publish_time":1720258815039,"maintainers":[{"name":"romainmenke","email":"romainmenke@gmail.com"},{"name":"alaguna","email":"sombragriselros@gmail.com"},{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"_cnpm_publish_time":1720258815039,"dist-tags":{"latest":"5.0.17"}}