{"name":"postcss-write-svg","version":"2.1.0","description":"Write SVGs directly in CSS","keywords":["postcss","css","postcss-plugin","markups","customs","svgs","scalable","vectors","graphics","multiplexing","syntaxes","params","vars","variables"],"author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"license":"CC0-1.0","repository":{"type":"git","url":"git+https://github.com/jonathantneal/postcss-write-svg.git"},"homepage":"https://github.com/jonathantneal/postcss-write-svg#readme","bugs":{"url":"https://github.com/jonathantneal/postcss-write-svg/issues"},"dependencies":{"postcss":"^5.0.17","postcss-value-parser":"^3.3.0"},"devDependencies":{"eslint":"^2.2.0","jscs":"^2.10.1","tap-spec":"^4.1.1","tape":"^4.4.0"},"scripts":{"lint":"eslint *.js --ignore-path .gitignore && jscs *.js","tape":"tape test.js | tap-spec","test":"npm run lint && npm run tape"},"engines":{"iojs":">=2.0.0","node":">=0.12.0"},"gitHead":"1d07fabd51bd6ccc0816ee57ba109a59aaf92fb4","_id":"postcss-write-svg@2.1.0","_shasum":"059be86c13b49e46aebb330dcc51258f5456cbe5","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.4.1","_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"dist":{"shasum":"059be86c13b49e46aebb330dcc51258f5456cbe5","tarball":"http://registry-npm.ywwl.com/postcss-write-svg/download/postcss-write-svg-2.1.0.tgz","integrity":"sha512-UyofW7snMEK0WJfTVYNlbzUy00i0yFYx0i9RdSP6AtVEBk3wnAcyfWvbZFxcuu2bBCtDHfirAzOvOeMpMIfyog==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbe9sofbVTQXpINv0RvrpjLwbNKQOuziifRISgPfUNqAIhAMwhD9JkwYdBnnMfAVxW+JiQdD/wl0IVvJ0sTdhcDTUF"}],"size":8498,"noattachment":false,"key":"/postcss-write-svg/-/postcss-write-svg-2.1.0.tgz"},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/postcss-write-svg-2.1.0.tgz_1456515268265_0.8746544120367616"},"directories":{},"readme":"# Write SVG <a href=\"https://github.com/postcss/postcss\"><img src=\"https://postcss.github.io/postcss/logo.svg\" alt=\"PostCSS Logo\" width=\"90\" height=\"90\" align=\"right\"></a>\n\n[![NPM Version][npm-img]][npm-url]\n[![Build Status][cli-img]][cli-url]\n[![Licensing][lic-image]][lic-url]\n[![Changelog][log-image]][log-url]\n[![Gitter Chat][git-image]][git-url]\n\n[Write SVG] lets you write SVGs directly in CSS.\n\n```css\n/* before */\n\n@svg square {\n\t@rect {\n\t\tfill: var(--color, black);\n\t\twidth: var(--size);\n\t\theight: var(--size);\n\t}\n}\n\n.example {\n\tbackground: svg(square param(--color green) param(--size 100%)) center / cover;\n}\n\n/* after */\n\n.example {\n\tbackground: url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect fill='green' width='100%25' height='100%25'/%3E%3C/svg%3E\") center / cover;\n}\n```\n\n`@svg` at-rules generate SVG elements available to CSS. Within an `@svg`, descendant at-rules (like `@rect`) are interpreted as elements, while declarations (like `width`) are interpreted as attributes.\n\nThe `svg()` function renders an `@svg` as a data `url()`. `var()` functions within an `@svg` honor the variables passed in through `param()` functions.\n\n## Options\n\n#### `utf8`\n\nType: `Boolean`  \nDefault: `true`\n\nAllows you to define whether UTF-8 or base64 encoding will be used.\n\n```css\n/* before { utf8: false } */\n\n@svg square {\n\t@rect {\n\t\tfill: black;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t}\n}\n\n.example {\n\tbackground: svg(square);\n}\n\n/* after */\n\n.example {\n\tbackground: url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxyZWN0IGZpbGw9ImJsYWNrIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIi8+PC9zdmc+\");\n}\n```\n\n## Usage\n\nAdd [Write SVG] to your build tool:\n\n```bash\nnpm install jonathantneal/postcss-write-svg --save-dev\n```\n\n#### Node\n\n```js\nrequire('postcss-write-svg').process(YOUR_CSS, { /* options */ });\n```\n\n#### PostCSS\n\nAdd [PostCSS] to your build tool:\n\n```bash\nnpm install postcss --save-dev\n```\n\nLoad [Write SVG] as a PostCSS plugin:\n\n```js\npostcss([\n\trequire('postcss-write-svg')({ /* options */ })\n]).process(YOUR_CSS, /* options */);\n```\n\n#### Gulp\n\nAdd [Gulp PostCSS] to your build tool:\n\n```bash\nnpm install gulp-postcss --save-dev\n```\n\nEnable [Write SVG] within your Gulpfile:\n\n```js\nvar postcss = require('gulp-postcss');\n\ngulp.task('css', function () {\n\treturn gulp.src('./src/*.css').pipe(\n\t\tpostcss([\n\t\t\trequire('postcss-write-svg')({ /* options */ })\n\t\t])\n\t).pipe(\n\t\tgulp.dest('.')\n\t);\n});\n```\n\n#### Grunt\n\nAdd [Grunt PostCSS] to your build tool:\n\n```bash\nnpm install grunt-postcss --save-dev\n```\n\nEnable [Write SVG] within your Gruntfile:\n\n```js\ngrunt.loadNpmTasks('grunt-postcss');\n\ngrunt.initConfig({\n\tpostcss: {\n\t\toptions: {\n\t\t\tuse: [\n\t\t\t\trequire('postcss-write-svg')({ /* options */ })\n\t\t\t]\n\t\t},\n\t\tdist: {\n\t\t\tsrc: '*.css'\n\t\t}\n\t}\n});\n```\n\n[npm-url]: https://www.npmjs.com/package/postcss-write-svg\n[npm-img]: https://img.shields.io/npm/v/postcss-write-svg.svg\n[cli-url]: https://travis-ci.org/jonathantneal/postcss-write-svg\n[cli-img]: https://img.shields.io/travis/jonathantneal/postcss-write-svg.svg\n[lic-url]: LICENSE.md\n[lic-image]: https://img.shields.io/npm/l/postcss-write-svg.svg\n[log-url]: CHANGELOG.md\n[log-image]: https://img.shields.io/badge/changelog-md-blue.svg\n[git-url]: https://gitter.im/postcss/postcss\n[git-image]: https://img.shields.io/badge/chat-gitter-blue.svg\n\n[Write SVG]: https://github.com/jonathantneal/postcss-write-svg\n[PostCSS]: https://github.com/postcss/postcss\n[Gulp PostCSS]: https://github.com/postcss/gulp-postcss\n[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss\n","publish_time":1456515269664,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","_cnpm_publish_time":1456515269664,"dist-tags":{"latest":"3.0.1"}}