{"name":"postcss-color-functional-notation","description":"Use space and slash separated color notation in CSS","version":"4.2.3","author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"license":"CC0-1.0","funding":{"type":"opencollective","url":"https://opencollective.com/csstools"},"engines":{"node":"^12 || ^14 || >=16"},"main":"dist/index.cjs","module":"dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","default":"./dist/index.mjs"}},"dependencies":{"postcss-value-parser":"^4.2.0"},"peerDependencies":{"postcss":"^8.4"},"scripts":{"build":"rollup -c ../../rollup/default.js","clean":"node -e \"fs.rmSync('./dist', { recursive: true, force: true });\"","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","test:rewrite-expects":"REWRITE_EXPECTS=true node .tape.mjs"},"homepage":"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-functional-notation#readme","repository":{"type":"git","url":"git+https://github.com/csstools/postcss-plugins.git","directory":"plugins/postcss-color-functional-notation"},"bugs":{"url":"https://github.com/csstools/postcss-plugins/issues"},"keywords":["color","colors","comma","css","design","functional","hsl","hsla","hwb","notation","postcss","postcss-plugin","rgb","rgba","space","syntax"],"csstools":{"exportName":"postcssColorFunctionalNotation","humanReadableName":"PostCSS Color Functional Notation"},"volta":{"extends":"../../package.json"},"gitHead":"2e6d070d2eca342d7fe60135020df029746224cd","_id":"postcss-color-functional-notation@4.2.3","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-5fbr6FzFzjwHXKsVnkmEYrJYG8VNNzvD1tAXaPPWR97S6rhKI5uh2yOfV5TAzhDkZoq4h+chxEplFDc8GeyFtw==","shasum":"23c9d73c76113b75473edcf66f443c6f1872bd0f","tarball":"http://registry-npm.ywwl.com/postcss-color-functional-notation/download/postcss-color-functional-notation-4.2.3.tgz","fileCount":9,"unpackedSize":24274,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGQAzHfeN1EIDs2OZE6J7ed4pG2m4cVDXATSBRuS1wvWAiBd5aPagITkq08tBPB+a4oCVECr8guKcy+4lsG2RZXPXA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihnggACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmovlQ/9HMBrJXxJ1ApRkCV+9WMObaYYAmvIf2xVvwJZZYqxFDYs1WK3\r\nZdODiRUTCSQU2Z7KgFccOx6DnHZqYc5fDOEKlS63YYO2nbgjV5G/nq37HCbp\r\nP1iTyxyB4katgcHTklDlfJeNPyHXd7i8v0AsprR48Ow0wxXc03nKkoW3zj09\r\nKipHz/ZWttt9p5bfqEKBiOx/LGL3GVV5ejreV9U7zTHiVRvFl1lRh/0f8XXN\r\n/KOWkcBUWN71QUaw/Ja7cddxXj3Uq3cyHGPiu8++UY7N3vxZhz/85mnn+zrn\r\nOo7sDkugEraE610aOApUmpQHER44T9vNgSUbHEhQHw1Od5/Zp7WeyOwJYibh\r\nuFOGoAFckgMGktFAv1rla3ohQwd6U6NrUDI5gKgPa1+X7XVHc6E+aAJk3BLd\r\nkg+q0kBQxGE+j7RhT2IrCzn5QMl/Hql3phvVzu7L2nl470uWwuoHUUE/4TPh\r\nS/iUN+AsCGvunFHWNQKy3SUYqxZ2LL3eaVVmUSeil67PK9NkRlA7qRTs5RZn\r\nm5xA9+Su3w3ZF5GtOegXpjvhmaOIAuLJcJa0oodSrzHSZZTQ+uOkpz+k+D/6\r\nRxB1RoG0Ewwn+YFKlKgTyG/y/ww9TRKeUMEjZ1Cef5L7CDbHo6M+vjPlI7os\r\nxgszBXNM5pP94JRAsPGSvwD9bcRUth7ruIQ=\r\n=+wuL\r\n-----END PGP SIGNATURE-----\r\n","size":7943,"noattachment":false,"key":"/postcss-color-functional-notation/-/postcss-color-functional-notation-4.2.3.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.2.3_1652979744477_0.5999196859827429"},"_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":1652979744628,"_cnpm_publish_time":1652979744628,"dist-tags":{"latest":"8.0.17"}}