{"name":"postcss-svgo","version":"7.0.2","keywords":["css","minify","optimise","postcss","postcss-plugin","svg","svgo"],"author":{"url":"http://beneb.info","name":"Ben Briggs","email":"beneb.info@gmail.com"},"license":"MIT","_id":"postcss-svgo@7.0.2","maintainers":[{"name":"beneb","email":"beneb.info@gmail.com"},{"name":"ludovicofischer","email":"livrerie@gmail.com"},{"name":"ai","email":"andrey@sitnik.ru"},{"name":"chriseppstein","email":"chris@eppsteins.net"},{"name":"andyjansson","email":"jansson.andy@gmail.com"},{"name":"evilebottnawi","email":"sheo13666q@gmail.com"},{"name":"cssnano-bot","email":"sahaaniketh@gmail.com"}],"homepage":"https://github.com/cssnano/cssnano","bugs":{"url":"https://github.com/cssnano/cssnano/issues"},"dist":{"shasum":"3de498299af585a5bfae28fd2a445edd1f4954f6","tarball":"http://registry-npm.ywwl.com/postcss-svgo/download/postcss-svgo-7.0.2.tgz","fileCount":10,"integrity":"sha512-5Dzy66JlnRM6pkdOTF8+cGsB1fnERTE8Nc+Eed++fOWo1hdsBptCsbG8UuJkgtZt75bRtMJIrPeZmtfANixdFA==","signatures":[{"sig":"MEUCIQDdXQO+6oidLwG2H6NthWrZcXtNmTxHqJupxS4iWejxvAIgSRspdske+3RTn4Bt4LHD6ysZIzuRxzPxhgkjUNPjT3M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10626,"size":4895,"noattachment":false,"key":"/postcss-svgo/-/postcss-svgo-7.0.2.tgz"},"main":"src/index.js","_from":"file:postcss-svgo-7.0.2.tgz","types":"types/index.d.ts","engines":{"node":"^18.12.0 || ^20.9.0 || >= 18"},"_npmUser":{"name":"ludovicofischer","email":"livrerie@gmail.com"},"_resolved":"/tmp/5fe4f56a6624a2ca580372b99f09179e/postcss-svgo-7.0.2.tgz","_integrity":"sha512-5Dzy66JlnRM6pkdOTF8+cGsB1fnERTE8Nc+Eed++fOWo1hdsBptCsbG8UuJkgtZt75bRtMJIrPeZmtfANixdFA==","repository":{"url":"git+https://github.com/cssnano/cssnano.git","type":"git"},"_npmVersion":"10.8.2","description":"Optimise inline SVG with PostCSS.","directories":{},"_nodeVersion":"20.19.1","dependencies":{"svgo":"^3.3.2","postcss-value-parser":"^4.2.0"},"_hasShrinkwrap":false,"devDependencies":{"postcss":"^8.5.3","pleeease-filters":"^4.0.0"},"peerDependencies":{"postcss":"^8.4.32"},"_npmOperationalInternal":{"tmp":"tmp/postcss-svgo_7.0.2_1746539665224_0.6859370713606998","host":"s3://npm-registry-packages-npm-production"},"readme":"# [postcss][postcss]-svgo\n\n> Optimise inline SVG with PostCSS.\n\n\n## Install\n\nWith [npm](https://npmjs.org/package/postcss-svgo) do:\n\n```\nnpm install postcss-svgo --save\n```\n\n\n## Example\n\n### Input\n\n```css\nh1 {\n    background: url('data:image/svg+xml;charset=utf-8,<?xml version=\"1.0\" encoding=\"utf-8\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:space=\"preserve\"><circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"yellow\" /></svg>');\n}\n\nh2 {\n    background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PGNpcmNsZSBjeD0iNTAiIGN5PSI1MCIgcj0iNDAiIGZpbGw9InllbGxvdyIgLz48IS0tdGVzdCBjb21tZW50LS0+PC9zdmc+');\n}\n```\n\n### Output\n\n```css\nh1 {\n    background: url('data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"%23ff0\"/></svg>');\n}\n\nh2 {\n    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxjaXJjbGUgY3g9IjUwIiBjeT0iNTAiIHI9IjQwIiBmaWxsPSIjZmYwIi8+PC9zdmc+');\n}\n```\n\n\n## API\n\n### `svgo([options])`\n\n#### options\n\n##### encode\n\nType: `boolean`\nDefault: `undefined`\n\nIf `true`, it will encode URL-unsafe characters such as `<`, `>` and `&`;\n`false` will decode these characters, and `undefined` will neither encode nor\ndecode the original input. Note that regardless of this setting, `#` will\nalways be URL-encoded.\n\n##### plugins\n\nOptionally, you can customise the output by specifying the `plugins` option. You\nwill need to provide the config in comma separated objects, like the example\nbelow. Note that you can either disable the plugin by setting it to `false`,\nor pass different options to change the default behaviour.\n\n```js\nconst postcss = require('postcss');\nconst svgo = require('postcss-svgo');\n\nconst opts = {\n    plugins: [{\n        name: 'preset-default',\n        params: {\n            overrides: {\n                removeViewBox: false,\n                removeComments: false,\n                cleanupNumericValues: {\n                    floatPrecision: 2\n                }\n            }\n        }\n    }]\n};\n\n\npostcss([ svgo(opts) ]).process(css).then((result) => {\n    console.log(result.css)\n});\n```\n\nYou can view the [full list of plugins here][plugins].\n\n\n## Security\n\nThis package optimises SVG data URIs; it is not an SVG sanitizer. Do not rely\non it to remove active or unsafe SVG content.\n\nSanitize user-controlled SVG with a purpose-built sanitizer before\noptimisation.\n\n\n## Usage\n\nSee the [PostCSS documentation](https://github.com/postcss/postcss#usage) for\nexamples for your environment.\n\n\n## Contributors\n\nSee [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/main/CONTRIBUTORS.md).\n\n\n## License\n\nMIT © [Ben Briggs](https://beneb.info)\n\n[postcss]: https://github.com/postcss/postcss\n[plugins]: https://svgo.dev/docs/plugins/\n","publish_time":1746539665399,"_cnpm_publish_time":1746539665399,"dist-tags":{"latest":"9.1.0","next":"5.0.0-rc.2","nightly":"4.0.0-nightly.2020.2.6"}}