{"name":"postcss-double-position-gradients","version":"6.0.4","keywords":["color","conic","css","double","gradients","linear","position","postcss","postcss-plugin","radial","repeating","stop","syntax"],"author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"license":"MIT-0","_id":"postcss-double-position-gradients@6.0.4","maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},{"name":"alaguna","email":"sombragriselros@gmail.com"},{"name":"romainmenke","email":"romainmenke@gmail.com"}],"homepage":"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-double-position-gradients#readme","bugs":{"url":"https://github.com/csstools/postcss-plugins/issues"},"dist":{"shasum":"b482d08b5ced092b393eb297d07976ab482d4cad","tarball":"http://registry-npm.ywwl.com/postcss-double-position-gradients/download/postcss-double-position-gradients-6.0.4.tgz","fileCount":7,"integrity":"sha512-m6IKmxo7FxSP5nF2l63QbCC3r+bWpFUWmZXZf096WxG0m7Vl1Q1+ruFOhpdDRmKrRS+S3Jtk+TVk/7z0+BVK6g==","signatures":[{"sig":"MEUCIQD1fwXEt9tD/VB7EmzuqML/dMsdDme25BqPbwEHlhvFMAIgIKuPbu3nKJIXugyjwqcdwlpw/UyhIKYyYPgipMheEVk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11506,"size":3886,"noattachment":false,"key":"/postcss-double-position-gradients/-/postcss-double-position-gradients-6.0.4.tgz"},"main":"dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=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":"ee552346963b5b9cb59dcbc979552a99dab7cbd8","scripts":{},"_npmUser":{"name":"romainmenke","email":"romainmenke@gmail.com"},"repository":{"url":"git+https://github.com/csstools/postcss-plugins.git","type":"git","directory":"plugins/postcss-double-position-gradients"},"_npmVersion":"11.4.2","description":"Use double-position gradients in CSS","directories":{},"_nodeVersion":"24.4.0","dependencies":{"@csstools/utilities":"^2.0.0","postcss-value-parser":"^4.2.0","@csstools/postcss-progressive-custom-properties":"^4.2.1"},"_hasShrinkwrap":false,"peerDependencies":{"postcss":"^8.4"},"_npmOperationalInternal":{"tmp":"tmp/postcss-double-position-gradients_6.0.4_1758465443193_0.3893975156247038","host":"s3://npm-registry-packages-npm-production"},"readme":"# PostCSS Double Position Gradients [<img src=\"https://postcss.github.io/postcss/logo.svg\" alt=\"PostCSS\" width=\"90\" height=\"90\" align=\"right\">][postcss]\n\n[<img alt=\"NPM Version\" src=\"https://img.shields.io/npm/v/postcss-double-position-gradients.svg\" height=\"20\">][npm-url]\n[<img alt=\"Discord\" src=\"https://shields.io/badge/Discord-5865F2?logo=discord&logoColor=white\">][discord]\n<br><br>\n[<img alt=\"Baseline Status\" src=\"https://cssdb.org/images/badges-baseline/double-position-gradients.svg\" height=\"20\">][css-url]\n[<img alt=\"CSS Standard Status\" src=\"https://cssdb.org/images/badges/double-position-gradients.svg\" height=\"20\">][css-url]\n\n[PostCSS Double Position Gradients] lets you use double-position gradients in\nCSS, following the [CSS Image Values and Replaced Content] specification.\n\n```css\n.linear-gradient {\n  background-image: linear-gradient(90deg, black 25% 50%, blue 50% 75%);\n}\n\n.conic-gradient {\n  background-image: conic-gradient(yellowgreen 40%, gold 0deg 75%, #f06 0deg);\n}\n\n/* becomes */\n\n.linear-gradient {\n  background-image: linear-gradient(90deg, black 25%, black 50%, blue 50%, blue 75%);\n  background-image: linear-gradient(90deg, black 25% 50%, blue 50% 75%);\n}\n\n.conic-gradient {\n  background-image: conic-gradient(yellowgreen 40%, gold 0deg, gold 75%, #f06 0deg);\n  background-image: conic-gradient(yellowgreen 40%, gold 0deg 75%, #f06 0deg);\n}\n```\n\n## Usage\n\nAdd [PostCSS Double Position Gradients] to your project:\n\n```bash\nnpm install postcss-double-position-gradients --save-dev\n```\n\nUse [PostCSS Double Position Gradients] to process your CSS:\n\n```js\nconst postcssDoublePositionGradients = require('postcss-double-position-gradients');\n\npostcssDoublePositionGradients.process(YOUR_CSS /*, processOptions, pluginOptions */);\n```\n\nOr use it as a [PostCSS] plugin:\n\n```js\nconst postcss = require('postcss');\nconst postcssDoublePositionGradients = require('postcss-double-position-gradients');\n\npostcss([\n  postcssDoublePositionGradients(/* pluginOptions */)\n]).process(YOUR_CSS /*, processOptions */);\n```\n\n[PostCSS Double Position Gradients] runs in all Node environments, with special instructions for:\n\n| [Node](INSTALL.md#node) | [PostCSS CLI](INSTALL.md#postcss-cli) | [Webpack](INSTALL.md#webpack) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) |\n| --- | --- | --- | --- | --- |\n\n## Options\n\n### preserve\n\nThe `preserve` option determines whether the original double-position gradients\nshould be preserved. By default, double-position gradients are preserved.\n\n```js\npostcssDoublePositionGradients({ preserve: false })\n```\n\n```css\n.linear-gradient {\n  background-image: linear-gradient(90deg, black 25% 50%, blue 50% 75%);\n}\n\n.conic-gradient {\n  background-image: conic-gradient(yellowgreen 40%, gold 0deg 75%, #f06 0deg);\n}\n\n/* becomes */\n\n.linear-gradient {\n  background-image: linear-gradient(90deg, black 25%, black 50%, blue 50%, blue 75%);\n}\n\n.conic-gradient {\n  background-image: conic-gradient(yellowgreen 40%, gold 0deg, gold 75%, #f06 0deg);\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\npostcssDoublePositionGradients({ enableProgressiveCustomProperties: false })\n```\n\n```css\n:root {\n\t--a-gradient: linear-gradient(90deg, black 25% 50%, blue 50% 75%);\n}\n\n/* becomes */\n\n:root {\n\t--a-gradient: linear-gradient(90deg, black 25%, black 50%, blue 50%, blue 75%); /* will never be used, not even in older browser */\n\t--a-gradient: linear-gradient(90deg, black 25% 50%, blue 50% 75%);\n}\n```\n\n[css-url]: https://cssdb.org/#double-position-gradients\n[discord]: https://discord.gg/bUadyRwkJS\n[npm-url]: https://www.npmjs.com/package/postcss-double-position-gradients\n\n[CSS Image Values and Replaced Content]: https://www.w3.org/TR/css-images-4/#color-stop-syntax\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS Double Position Gradients]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-double-position-gradients\n","publish_time":1758465443386,"_cnpm_publish_time":1758465443386,"dist-tags":{"latest":"7.0.6"}}