{"name":"postcss-color-functional-notation","version":"3.0.0","description":"Use space and slash separated color notation in CSS","author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"license":"CC0-1.0","repository":{"type":"git","url":"git+https://github.com/csstools/postcss-color-functional-notation.git"},"homepage":"https://github.com/csstools/postcss-color-functional-notation#readme","bugs":{"url":"https://github.com/csstools/postcss-color-functional-notation/issues"},"main":"dist/index.cjs.js","module":"dist/index.esm.mjs","scripts":{"build":"npx rollup -c .rollup.js","build:watch":"npx rollup -c .rollup.js --watch","lint":"npx eslint --cache src","lint:fix":"npx eslint --cache --fix","pretest":"npm install && npm run build","test":"npm run lint && npm run tape","tape":"npx postcss-tape"},"engines":{"node":">=10.0.0"},"dependencies":{"postcss":"^7.0.27","postcss-values-parser":"^3.2.0"},"devDependencies":{"@babel/core":"^7.9.0","@babel/preset-env":"^7.9.5","babel-eslint":"^10.1.0","eslint":"^6.8.0","postcss-tape":"^5.0.2","pre-commit":"^1.2.2","rollup":"^2.7.2","rollup-plugin-babel":"^4.4.0"},"babel":{"presets":[["@babel/env",{"targets":"maintained node versions"}]]},"eslintConfig":{"env":{"es6":true,"node":true},"extends":"eslint:recommended","parser":"babel-eslint"},"rollup":{"input":"src/index.js","plugins":["rollup-plugin-babel"],"output":[{"file":"dist/index.cjs.js","format":"cjs"},{"file":"dist/index.esm.js","format":"esm"}]},"keywords":["postcss","css","postcss-plugin","color","colors","rgb","rgba","hsl","hsla","hwb","functional","notation","design","syntax","space","comma"],"gitHead":"8b7757f2af78801e981c0340d0b7be3c018b95e2","_id":"postcss-color-functional-notation@3.0.0","_nodeVersion":"14.0.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-sSjpQvu9ydMCfWNl+JKf6gkwoBH+9stthJXy0eesMGSY4BxxYBz/R/bPgNBU+Z6Cn88gibtVxic4v8M5prDpXw==","shasum":"f0088757cf78c557163d8f57509021f0d9c4ec3b","tarball":"http://registry-npm.ywwl.com/postcss-color-functional-notation/download/postcss-color-functional-notation-3.0.0.tgz","fileCount":6,"unpackedSize":29274,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeo8LoCRA9TVsSAnZWagAA938P/2z3QylgwLHPiXdJtKoS\n1hKgumVOT/2S5WnPY8+PJTcHzCABeMoLDy7UTeUrFVZ1hREdIXu78ma8vv9n\nCU0L/2M6ZrxCOBCx7Q6YnlOI1ro0/s4rsa4JSXH+KUCI4oAwFxB+A+x1s2Y2\nqZD+eAVL0u2iTbsfTWBu9XhfVLlNhVEfEllQeLmfr/e3RyZTXU8YUQPEz0FH\n9/f+itTDpweMZL59PxNwhW85V/riZpFvceh4XxbuPMgYtxgSV8nEFh6yOCC/\n77NV4CMf0lM5GwPOm+Qr5jWDll7P0mcWS7/WejgL3MJvt/PIevAlxt2PRZPW\nrTe19r84eD6AgvBf27PRM7kU/mknD0+FTDWWHGsWGtUXgQwXWo2r8mMOz9qS\nhNxA4VCBw+hBrjXGVUyhcW5KN7CCSrpqjjPHuBrelsIWocCM5Qr4hvDBuS4P\nOJGdVu0nTcFJ/ubtnQ/aLqMvRJvdPEMmH1o2vAFpAIVPe1wIW8WqDmlx/Qm6\nOrf6bh0Lg4t3xeXhiRORgnp82URxjNdN/99nCVK+CpMPX+vFt6+rJED2Ll0L\nkkCsMKNI/DmtQchLrl85XfxH3LcXE1oan3RFjvqqq8lJOIMZ+A+MuM7/AH84\nIyiBP2bMOraYfVSCWx7rEME8iLrgdaPy2U6LJW17M2MGbp4/y0zOt+2U36Ql\ntWB8\r\n=3v/T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEyWIDCJhKczTB1e3zvWjN2LfT0/pxkpCHuWFYBEK5vpAiArFG7ZQE0Liv8kWfT+IjbRf6HxKBBQYORxzwbxgklOGg=="}],"size":6967,"noattachment":false,"key":"/postcss-color-functional-notation/-/postcss-color-functional-notation-3.0.0.tgz"},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-color-functional-notation_3.0.0_1587790567791_0.11813015505019564"},"_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":1587790567921,"_cnpm_publish_time":1587790567921,"dist-tags":{"latest":"8.0.17"}}