{"name":"postcss-write-svg","version":"3.0.0","description":"Write SVGs directly in CSS","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"},"main":"index.js","files":["index.js"],"scripts":{"lint":"echint && eslint index.js && jscs index.js","prepublish":"npm test","tape":"postcss-tape","test":"npm run lint && postcss-tape"},"engines":{"node":">=6.9.1"},"dependencies":{"postcss":"^5.2.6","postcss-value-parser":"^3.3.0"},"devDependencies":{"echint":"^2.1.0","echint-config-dev":"1.0.0","eslint":"^3.11.1","eslint-config-dev":"1.0.0","jscs":"^3.0.7","jscs-config-dev":"1.0.1","postcss-tape":"1.0.1"},"echint":{"extends":"dev"},"eslintConfig":{"extends":"dev","parserOptions":{"sourceType":"module"}},"jscsConfig":{"preset":"dev"},"keywords":["postcss","css","postcss-plugin","markups","customs","svgs","scalable","vectors","graphics","multiplexing","syntaxes","params","vars","variables"],"gitHead":"31079e14f66452f35a4fcfb15f8a8005c4c9869e","_id":"postcss-write-svg@3.0.0","_shasum":"0276ac35c79ba3b41829fd31855cbb110235120e","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.2.0","_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"dist":{"shasum":"0276ac35c79ba3b41829fd31855cbb110235120e","tarball":"http://registry-npm.ywwl.com/postcss-write-svg/download/postcss-write-svg-3.0.0.tgz","integrity":"sha512-HIrWG1dGgHBOSTcDqHVccyVOK50QvkYma2n6spjT47KqnvleO8qxbI3mKcVsm4i5McbZYvietgw+Jo/Cd3GcTQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDp1IHPOHP0gpwWoPMLkNGaF0ztLQwG7EF8Y7hh0p4i0AiAUnNJO+s3DwPMIVzrYcQoyZC8UfiCvIVO6P1zWW1RAlw=="}],"size":7812,"noattachment":false,"key":"/postcss-write-svg/-/postcss-write-svg-3.0.0.tgz"},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/postcss-write-svg-3.0.0.tgz_1481054385548_0.6143328519538045"},"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":1481054387619,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","_cnpm_publish_time":1481054387619,"dist-tags":{"latest":"3.0.1"}}