{"name":"postcss-write-svg","version":"1.1.0","description":"Write SVGs directly in CSS","keywords":["postcss","css","postcss-plugin","markups","svgs"],"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"},"bugs":{"url":"https://github.com/jonathantneal/postcss-write-svg/issues"},"homepage":"https://github.com/jonathantneal/postcss-write-svg","dependencies":{"postcss":"^5.0.4"},"devDependencies":{"chai":"^3.2.0","gulp":"^3.9.0","gulp-eslint":"^1.0.0","gulp-mocha":"^2.1.3"},"scripts":{"test":"gulp"},"gitHead":"dadf69aed16945cba9990c83f220527e2b50d3aa","_id":"postcss-write-svg@1.1.0","_shasum":"92007579655b6286bae5c6997acaae2d5f0c4568","_from":".","_npmVersion":"2.14.3","_nodeVersion":"0.12.5","_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"dist":{"shasum":"92007579655b6286bae5c6997acaae2d5f0c4568","tarball":"http://registry-npm.ywwl.com/postcss-write-svg/download/postcss-write-svg-1.1.0.tgz","integrity":"sha512-PhaaItuka1U7gXbU5fw9nZtRFohHZDg2LdodPJrcQZAPw6XBn8wogh7eQTW4nshpBwsgbOFd56PybmCYxWJvHg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9WeJwtBquv84/pHOMeNl6R0aWBCiATBsOMSepPFLoMgIhAOAMun9GONenrDzJoNlSysXEpP5X/Lh92k+QQOzJpQXZ"}],"size":4668,"noattachment":false,"key":"/postcss-write-svg/-/postcss-write-svg-1.1.0.tgz"},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"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":1442015877986,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","_cnpm_publish_time":1442015877986,"dist-tags":{"latest":"3.0.1"}}