{"_id":"@csstools/postcss-image-function@1.0.5","bugs":{"url":"https://github.com/csstools/postcss-plugins/issues"},"dist":{"shasum":"e05662fd72f8ac45e0fe75d3f4c4504613415872","tarball":"http://registry-npm.ywwl.com/@csstools/postcss-image-function/download/@csstools/postcss-image-function-1.0.5.tgz","fileCount":6,"integrity":"sha512-sgMTZ7pvWZUbhfOGWBY6Wx4+xfLUiPbMkGtoVtvo9hrJBM9s9eAs6K8XLac0XBwYKMC7jJSH9Zq8qPNOMvTOhg==","signatures":[{"sig":"MEUCIHbAJXVX+fgH1zrFfnZqBEbJO0/ITohVq9GGDyS1unQ3AiEAiQ2jIpMyzm/+7IOwS1+pwirYl/M2kOg8w2cd6oIwr8U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCcZ9Q4i01QHDIehkNsAUQCOXx+arvdAlVluIT0E3uj5wIhAPllcfnNHesR6sB7wPwxRXGNX+i4U+/sjyr8CSBBQHMo"}],"unpackedSize":7231,"size":3003,"noattachment":false,"key":"/@csstools/postcss-image-function/-/@csstools/postcss-image-function-1.0.5.tgz"},"name":"@csstools/postcss-image-function","type":"module","engines":{"node":">=20.19.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"}},"funding":[{"url":"https://github.com/sponsors/csstools","type":"github"},{"url":"https://opencollective.com/csstools","type":"opencollective"}],"gitHead":"93abc184108106095410f6576027c82aa345c20e","license":"MIT-0","scripts":{},"version":"1.0.5","_npmUser":{"name":"romainmenke","email":"romainmenke@gmail.com"},"homepage":"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-image-function#readme","keywords":["color","css","csswg","fallback","function","image","image-function","postcss","postcss-plugin"],"repository":{"url":"git+https://github.com/csstools/postcss-plugins.git","type":"git","directory":"plugins/postcss-image-function"},"_npmVersion":"11.13.0","description":"Generate a solid-color image from any color","directories":{},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},{"name":"alaguna","email":"sombragriselros@gmail.com"},{"name":"romainmenke","email":"romainmenke@gmail.com"}],"_nodeVersion":"26.1.0","contributors":[{"url":"https://antonio.laguna.es","name":"Antonio Laguna","email":"antonio@laguna.es"},{"name":"Romain Menke","email":"romainmenke@gmail.com"}],"dependencies":{"@csstools/utilities":"^3.0.0","@csstools/css-tokenizer":"^4.0.2","@csstools/css-parser-algorithms":"^4.0.2","@csstools/postcss-progressive-custom-properties":"^5.1.3"},"_hasShrinkwrap":false,"peerDependencies":{"postcss":"^8.4"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/postcss-image-function_1.0.5_1790835213466_0.357324259852555"},"readme":"# PostCSS Image Function [<img src=\"https://postcss.github.io/postcss/logo.svg\" alt=\"PostCSS Logo\" width=\"90\" height=\"90\" align=\"right\">][PostCSS]\n\n`npm install @csstools/postcss-image-function --save-dev`\n\n[PostCSS Image Function] lets you easily generate a solid-color image from any color following the [CSS Images 4 Specification].\n\n```css\n.foo {\n\tbackground-image: image(transparent);\n}\n\n.foo {\n\t--bg-image: image(transparent);\n}\n\n/* becomes */\n\n.foo {\n\tbackground-image: linear-gradient(transparent,transparent);\n}\n\n.foo {\n\t--bg-image: linear-gradient(transparent,transparent);\n}\n```\n\n## Usage\n\nAdd [PostCSS Image Function] to your project:\n\n```bash\nnpm install postcss @csstools/postcss-image-function --save-dev\n```\n\nUse it as a [PostCSS] plugin:\n\n```js\nconst postcss = require('postcss');\nconst postcssImageFunction = require('@csstools/postcss-image-function');\n\npostcss([\n\tpostcssImageFunction(/* pluginOptions */)\n]).process(YOUR_CSS /*, processOptions */);\n```\n\n\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\npostcssImageFunction({ preserve: true })\n```\n\n```css\n.foo {\n\tbackground-image: image(transparent);\n}\n\n.foo {\n\t--bg-image: image(transparent);\n}\n\n/* becomes */\n\n.foo {\n\tbackground-image: linear-gradient(transparent,transparent);\n\tbackground-image: image(transparent);\n}\n\n.foo {\n\t--bg-image: linear-gradient(transparent,transparent);\n}\n\n@supports (background-image: image(red)) {\n.foo {\n\t--bg-image: image(transparent);\n}\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/#image-function\n[discord]: https://discord.gg/bUadyRwkJS\n[npm-url]: https://www.npmjs.com/package/@csstools/postcss-image-function\n\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS Image Function]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-image-function\n[CSS Images 4 Specification]: https://drafts.csswg.org/css-images-4/#funcdef-image\n","publish_time":1790835213556,"_cnpm_publish_time":1790835213556,"dist-tags":{"latest":"1.0.8"}}