{"name":"rework-calc","version":"0.2.2","description":"Adding calc() support to rework","main":"index.js","scripts":{"test":"./node_modules/.bin/mocha -R spec"},"repository":{"type":"git","url":"git://github.com/rework/rework-calc.git"},"keywords":["rework","rework-plugins","css","calc"],"author":{"name":"Joakim Bengtson","email":"joakim@klei.se"},"license":"MIT","devDependencies":{"mocha":"~1.15.1","rework":"~0.18.3","chai":"~1.8.1"},"bugs":{"url":"https://github.com/rework/rework-calc/issues"},"homepage":"https://github.com/rework/rework-calc","_id":"rework-calc@0.2.2","dist":{"shasum":"b2eb293c8c82b5db35c5aacec9fcd4c86c7c71fb","tarball":"http://registry-npm.ywwl.com/rework-calc/download/rework-calc-0.2.2.tgz","integrity":"sha512-5id4h9w+8THJQSPXCWdIrLhsPeZWtF8Yda00XcyI6AB2NwMvL6CFrrtJTnAh5luiYtXhXhLdhu8DWcsft+jJng==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICDBttySTYLmZrwuVtwTZsG+WUZhHHClJNXamGCVsq1OAiB89zVU3Z41J/9YtXDTZFxmWO+0JI/+yCA+Aw8jnSNS1A=="}],"size":4191,"noattachment":false,"key":"/rework-calc/-/rework-calc-0.2.2.tgz"},"_from":".","_npmVersion":"1.3.17","_npmUser":{"name":"joakimbeng","email":"joakim@klei.se"},"maintainers":[{"name":"joakimbeng","email":"joakim@klei.se"}],"directories":{},"readme":"# rework-calc [![Build Status](https://travis-ci.org/reworkcss/rework-calc.png)](https://travis-ci.org/reworkcss/rework-calc)\n\nA [Rework](https://github.com/reworkcss/rework) plugin to support `calc()`.\nParticularly useful with the [rework-vars](https://github.com/reworkcss/rework-vars)\n\n## Installation\n\n```bash\nnpm install rework-calc\n```\n\n## Use\n\nAs a Rework plugin:\n\n```javascript\nvar rework = require('rework');\nvar calc = require('rework-calc');\n\nvar css = rework(cssString).use(calc).toString();\n```\n\n## Supported feature\n\nThis simply add `calc()` support, a feature to do simple calculations.  This\ncan be particularly useful with the [rework-vars](https://github.com/reworkcss/rework-vars) plugin.\n\n**Note:** When multiple units are mixed together in the same expression, the\n`calc()` statement is left as is, to fallback to the CSS3 calc feature.\n\n**Example** (with [rework-vars](https://github.com/reworkcss/rework-vars)\nenabled as well):\n\n```css\n:root {\n  --main-font-size: 16px;\n}\n\nbody {\n  font-size: var(--main-font-size);\n}\n\nh1 {\n  font-size: calc(var(--main-font-size) * 2);\n  height: calc(100px - 2em);\n}\n```\n\nyields:\n\n```css\nbody {\n  font-size: 16px\n}\n\nh1 {\n  font-size: 32px;\n  height: calc(100px - 2em)\n}\n```\n\nSee unit tests for another example.\n\n## Unit tests\n\nMake sure the dev-dependencies are installed, and then run:\n\n```bash\nnpm test\n```\n\n## License\n\nMIT\n","publish_time":1399137509820,"_cnpm_publish_time":1399137509820,"dist-tags":{"latest":"1.1.0"}}