{"name":"rework-calc","version":"0.2.1","description":"Adding calc() support to rework","main":"index.js","scripts":{"test":"./node_modules/.bin/mocha -R spec"},"repository":{"type":"git","url":"git://github.com/klei-dev/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/klei-dev/rework-calc/issues"},"_id":"rework-calc@0.2.1","dist":{"shasum":"8f24ecf495fc3093492ffa8e911406aad5a0dfbc","tarball":"http://registry-npm.ywwl.com/rework-calc/download/rework-calc-0.2.1.tgz","integrity":"sha512-4fM8RhRxyj8x9FC+L2b4WYDnLMDT+kDZK+eSHD7cipOc3tYpP3+jRX7eLlcVQPNr+nKBV6XGa/bdpJZHhjjf5A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/Dr4PWOIwbqCYtaRu5pcRcVDcn7Or3Kjq+WIlLLpy3QIhANJNzL7i0xUDYdIh7wvND2sXRNXiuzvzSZyCk36ihgA1"}],"size":3637,"noattachment":false,"key":"/rework-calc/-/rework-calc-0.2.1.tgz"},"_from":".","_npmVersion":"1.3.11","_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":1386924949726,"_cnpm_publish_time":1386924949726,"dist-tags":{"latest":"1.1.0"}}