{"name":"postcss-color-functional-notation","version":"4.0.2","description":"Use space and slash separated color notation in CSS","author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"license":"CC0-1.0","homepage":"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-functional-notation#readme","bugs":{"url":"https://github.com/csstools/postcss-plugins/issues"},"main":"dist/index.cjs","module":"dist/index.mjs","types":"./dist/index.d.ts","bin":{"postcss-color-functional-notation":"dist/cli.mjs"},"scripts":{"build":"rollup -c ../../rollup/default.js","clean":"node -e \"fs.rmSync('./dist', { recursive: true, force: true });\"","lint":"eslint ./src --ext .js --ext .ts --ext .mjs --no-error-on-unmatched-pattern","prepublishOnly":"npm run clean && npm run build && npm run test","stryker":"stryker run --logLevel error","test":"postcss-tape --ci"},"engines":{"node":"^12 || ^14 || >=16"},"dependencies":{"postcss-value-parser":"^4.2.0"},"devDependencies":{"postcss":"^8.3.6","postcss-tape":"^6.0.1"},"peerDependencies":{"postcss":"^8.3"},"keywords":["postcss","css","postcss-plugin","color","colors","rgb","rgba","hsl","hsla","hwb","functional","notation","design","syntax","space","comma"],"repository":{"type":"git","url":"git+https://github.com/csstools/postcss-plugins.git","directory":"plugins/postcss-color-functional-notation"},"gitHead":"60cbe86a8e30a9c78feec5fcee44a595daf512c1","_id":"postcss-color-functional-notation@4.0.2","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-x/fTBfK7wdJpF7uCI8QQfNVyXW3KBI3/0n8S9N/iZjS8jahnIWFM6fcatLI6GXcQieuAse/1wo2NBVJm5Ud73w==","shasum":"0e4d0d2d78f1d28d0acbed1a4d40bfcc2df06c32","tarball":"http://registry-npm.ywwl.com/postcss-color-functional-notation/download/postcss-color-functional-notation-4.0.2.tgz","fileCount":14,"unpackedSize":148896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhtxGcCRA9TVsSAnZWagAAdL8P/2NUnaR7SPy+fHZCLotV\nidHnOgmEjEJ6CXu6P1/2XtXtQn3oXGhiSRpr5wnj+tYULp47yGGJNejvL+hy\nuoogBjjcZG+4tiaGncVHSLPsNRKmw9VfdyQrrgQ9VwsskluBcJtr+GtuR1mA\nCqgzkhPdijzETYcdRwuL5t38mwULCHH7E/1HzHnXg8VaYdsK06roT1ALWPk4\nPEPTUmkxnF8NkL2i42nvpKmBod0ipJaMse1pC0vsdakTLOAG8crw6RCd3MHt\nig23Zng6JgMhDyfos0Qdn1TPp0GXlrHiTq6u6D5YhAGCX1K/RGimfnJNCWVH\naAu8NNO1qOUsz3pyTmjXazwrFtwThw4EXgDOgFcubrjds4s4RQPK8OT+5IQz\nC5K4LIJvh5hTE834UpEYqGQyC4UzQWoC1bSBjyD3igkFWXhg11bmZRO5Jmdj\nxpE2aSKGT3LLsl4O7tcknwMSYkXliY3hkdmQGBwg4F9KVC25WBe5/PDPo2UT\nd4QUquAgQmeeatei/sUUQEwMpPUM3LAa9LxRJYv6RrenuIINgXC9mSq6UhNp\n4mgAC8WiFN0S6mcyaw/u6uFVxWxWdLXvLKpp5gnbVUf+Sq7f/Gb90XWdfFHo\nd3jX/CgFIsuk6d6P8pMKHqVLLz5fPgPAdjYb1sxseHz5t8hdAsDlT/GBg2gP\nMSEg\r\n=r0OJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHf7/nCUjQXCJd5Zs70YGKILCHz99xfZ1BkgyL/QRJNwIhAOOOit4QzGXzvCgNuQC8McgQJ8jZ9S6wjXa9nDmzc4e9"}],"size":40831,"noattachment":false,"key":"/postcss-color-functional-notation/-/postcss-color-functional-notation-4.0.2.tgz"},"_npmUser":{"name":"alaguna","email":"sombragriselros@gmail.com"},"directories":{},"maintainers":[{"name":"alaguna","email":"sombragriselros@gmail.com"},{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-color-functional-notation_4.0.2_1639387547733_0.9730845354238367"},"_hasShrinkwrap":false,"readme":"# PostCSS Color Functional Notation [<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/postcss-color-functional-notation.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/color-functional-notation.svg\" height=\"20\">][css-url] [<img alt=\"CSS Standard Status\" src=\"https://cssdb.org/images/badges/color-functional-notation.svg\" height=\"20\">][css-url] \n\n```bash\nnpm install postcss-color-functional-notation --save-dev\n```\n\n[PostCSS Color Functional Notation] lets you use space and slash separated\ncolor notation in CSS, following the [CSS Color] specification.\n\n```pcss\n:root {\n\t--firebrick: rgb(178 34 34);\n\t--firebrick-a50: rgb(70% 13.5% 13.5% / 50%);\n\t--firebrick-hsl: hsla(0 68% 42%);\n\t--firebrick-hsl-a50: hsl(0 68% 42% / 50%);\n}\n\n/* becomes */\n\n:root {\n\t--firebrick: rgb(178, 34, 34);\n\t--firebrick-a50: rgba(179, 34, 34, 0.5);\n\t--firebrick-hsl: hsl(0, 68%, 42%);\n\t--firebrick-hsl-a50: hsla(0, 68%, 42%, 0.5);\n}\n```\n\n## Usage\n\nAdd [PostCSS Color Functional Notation] to your project:\n\n```bash\nnpm install postcss postcss-color-functional-notation --save-dev\n```\n\nUse it as a [PostCSS] plugin:\n\n```js\nconst postcss = require('postcss');\nconst postcssColorFunctionalNotation = require('postcss-color-functional-notation');\n\npostcss([\n\tpostcssColorFunctionalNotation(/* pluginOptions */)\n]).process(YOUR_CSS /*, processOptions */);\n```\n\n[PostCSS Color Functional Notation] 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\npostcssColorFunctionalNotation({ preserve: true })\n```\n\n```pcss\n:root {\n\t--firebrick: rgb(178 34 34);\n\t--firebrick-a50: rgb(70% 13.5% 13.5% / 50%);\n\t--firebrick-hsl: hsla(0 68% 42%);\n\t--firebrick-hsl-a50: hsl(0 68% 42% / 50%);\n}\n\n/* becomes */\n\n:root {\n\t--firebrick: rgb(178, 34, 34);\n\t--firebrick-a50: rgba(179, 34, 34, 0.5);\n\t--firebrick-hsl: hsl(0, 68%, 42%);\n\t--firebrick-hsl: hsla(0 68% 42%);\n\t--firebrick-hsl-a50: hsla(0, 68%, 42%, 0.5);\n}\n\n@supports (color: rgb(0 0 0 / 0)) {\n:root {\n\t--firebrick: rgb(178 34 34);\n\t--firebrick-a50: rgb(70% 13.5% 13.5% / 50%);\n}\n}\n\n@supports (color: hsl(0 0% 0% / 0)) {\n:root {\n\t--firebrick-hsl-a50: hsl(0 68% 42% / 50%);\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\npostcssColorFunctionalNotation({ enableProgressiveCustomProperties: false })\n```\n\n```pcss\n:root {\n\t--firebrick: rgb(178 34 34);\n\t--firebrick-a50: rgb(70% 13.5% 13.5% / 50%);\n\t--firebrick-hsl: hsla(0 68% 42%);\n\t--firebrick-hsl-a50: hsl(0 68% 42% / 50%);\n}\n\n/* becomes */\n\n:root {\n\t--firebrick: rgb(178, 34, 34);\n\t--firebrick: rgb(178 34 34);\n\t--firebrick-a50: rgba(179, 34, 34, 0.5);\n\t--firebrick-a50: rgb(70% 13.5% 13.5% / 50%);\n\t--firebrick-hsl: hsl(0, 68%, 42%);\n\t--firebrick-hsl: hsla(0 68% 42%);\n\t--firebrick-hsl-a50: hsla(0, 68%, 42%, 0.5);\n\t--firebrick-hsl-a50: hsl(0 68% 42% / 50%);\n}\n```\n\n_Custom properties do not fallback to the previous declaration_\n\n[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test\n[css-url]: https://cssdb.org/#color-functional-notation\n[discord]: https://discord.gg/bUadyRwkJS\n[npm-url]: https://www.npmjs.com/package/postcss-color-functional-notation\n\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS Color Functional Notation]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-functional-notation\n[CSS Color]: https://www.w3.org/TR/css-color-4/#funcdef-rgb\n","publish_time":1639387548119,"_cnpm_publish_time":1639387548119,"dist-tags":{"latest":"8.0.17"}}