{"_id":"rework-inherit","_rev":"153766","name":"rework-inherit","description":"Inherit rules from other selectors","dist-tags":{"latest":"0.2.3"},"maintainers":[{"name":"michelle","email":"michelle@michellebu.com"}],"time":{"modified":"2021-06-03T11:34:33.000Z","created":"2013-03-14T13:37:11.566Z","0.2.3":"2014-07-16T23:09:24.867Z","0.2.2":"2014-05-08T21:18:27.697Z","0.2.1":"2013-10-10T19:24:03.980Z","0.2.0":"2013-10-09T23:44:01.398Z","0.1.6":"2013-07-01T20:17:55.497Z","0.1.5":"2013-06-11T03:08:53.490Z","0.1.4":"2013-06-11T02:49:54.190Z","0.1.3":"2013-06-03T17:38:36.189Z","0.1.2":"2013-05-20T22:47:25.417Z","0.1.1":"2013-05-16T04:19:36.049Z","0.1.0":"2013-04-06T00:35:14.693Z","0.0.2":"2013-03-15T02:04:18.979Z","0.0.1":"2013-03-14T13:37:11.566Z"},"users":{},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/reworkcss/rework-inherit.git"},"versions":{"0.2.3":{"name":"rework-inherit","description":"Inherit rules from other selectors","version":"0.2.3","dependencies":{"debug":"*"},"devDependencies":{"rework":">= 0.15.0"},"scripts":{"test":"node test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/reworkcss/rework-inherit.git"},"bugs":{"url":"https://github.com/reworkcss/rework-inherit/issues","email":"me@jongleberry.com"},"license":"MIT","_id":"rework-inherit@0.2.3","dist":{"shasum":"74b9f4f9fb88d874886664363a41128875875016","size":4042,"noattachment":false,"key":"/rework-inherit/-/rework-inherit-0.2.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-inherit/download/rework-inherit-0.2.3.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"michelle","email":"michelle@michellebu.com"},"maintainers":[{"name":"michelle","email":"michelle@michellebu.com"}],"directories":{},"publish_time":1405552164867,"_cnpm_publish_time":1405552164867,"_hasShrinkwrap":false},"0.2.2":{"name":"rework-inherit","description":"Inherit rules from other selectors","version":"0.2.2","dependencies":{"debug":"*"},"devDependencies":{"rework":">= 0.15.0"},"scripts":{"test":"node test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/reworkcss/rework-inherit.git"},"bugs":{"url":"https://github.com/reworkcss/rework-inherit/issues","email":"me@jongleberry.com"},"license":"MIT","_id":"rework-inherit@0.2.2","dist":{"shasum":"bfe3aef75108f67d26f4045363914d4b260e6e2c","size":3929,"noattachment":false,"key":"/rework-inherit/-/rework-inherit-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-inherit/download/rework-inherit-0.2.2.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"anthonyshort","email":"antshort@gmail.com"},"maintainers":[{"name":"michelle","email":"michelle@michellebu.com"}],"directories":{},"publish_time":1399583907697,"_cnpm_publish_time":1399583907697,"_hasShrinkwrap":false},"0.2.1":{"name":"rework-inherit","description":"Inherit rules from other selectors","version":"0.2.1","dependencies":{"debug":"*"},"peerDependencies":{"rework":">= 0.15.0"},"devDependencies":{"rework":">= 0.15.0"},"scripts":{"test":"node test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/reworkcss/rework-inherit.git"},"bugs":{"url":"https://github.com/reworkcss/rework-inherit/issues","email":"me@jongleberry.com"},"license":"MIT","readmeFilename":"README.md","_id":"rework-inherit@0.2.1","dist":{"shasum":"fdd01a199b0a86ef909436fb373f7b343936f185","size":3794,"noattachment":false,"key":"/rework-inherit/-/rework-inherit-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-inherit/download/rework-inherit-0.2.1.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"michelle","email":"michelle@michellebu.com"}],"directories":{},"publish_time":1381433043980,"_cnpm_publish_time":1381433043980,"_hasShrinkwrap":false},"0.2.0":{"name":"rework-inherit","description":"Inherit rules from other selectors","version":"0.2.0","dependencies":{"debug":"*"},"peerDependencies":{"rework":">= 0.15.0"},"devDependencies":{"rework":">= 0.15.0"},"scripts":{"test":"node test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/jonathanong/rework-inherit.git"},"bugs":{"url":"https://github.com/jonathanong/rework-inherit/issues","email":"me@jongleberry.com"},"license":"MIT","readmeFilename":"README.md","_id":"rework-inherit@0.2.0","dist":{"shasum":"be21848414a89d37a536ce7311016c5951746c4a","size":3791,"noattachment":false,"key":"/rework-inherit/-/rework-inherit-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-inherit/download/rework-inherit-0.2.0.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"michelle","email":"michelle@michellebu.com"}],"directories":{},"publish_time":1381362241398,"_cnpm_publish_time":1381362241398,"_hasShrinkwrap":false},"0.1.6":{"name":"rework-inherit","description":"Inherit rules from other selectors","version":"0.1.6","dependencies":{"debug":"*"},"peerDependencies":{"rework":">= 0.15.0"},"devDependencies":{"rework":">= 0.15.0"},"scripts":{"test":"node test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/jonathanong/rework-inherit.git"},"bugs":{"url":"https://github.com/jonathanong/rework-inherit/issues","email":"me@jongleberry.com"},"license":"MIT","readmeFilename":"README.md","_id":"rework-inherit@0.1.6","dist":{"shasum":"6490d0d34bbc7ab36bf3ce1c6510c6bcac1c9526","size":3786,"noattachment":false,"key":"/rework-inherit/-/rework-inherit-0.1.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-inherit/download/rework-inherit-0.1.6.tgz"},"_from":".","_npmVersion":"1.3.1","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"michelle","email":"michelle@michellebu.com"}],"directories":{},"publish_time":1372709875497,"_cnpm_publish_time":1372709875497,"_hasShrinkwrap":false},"0.1.5":{"name":"rework-inherit","description":"Inherit rules from other selectors","version":"0.1.5","dependencies":{"debug":"*"},"peerDependencies":{"rework":">= 0.15.0"},"devDependencies":{"rework":">= 0.15.0"},"scripts":{"test":"node test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/jonathanong/rework-inherit.git"},"bugs":{"url":"https://github.com/jonathanong/rework-inherit/issues","email":"me@jongleberry.com"},"license":"MIT","readmeFilename":"README.md","_id":"rework-inherit@0.1.5","dist":{"shasum":"c2f41c194a350af73f370ac95ec6fafe9ea7eec5","size":3803,"noattachment":false,"key":"/rework-inherit/-/rework-inherit-0.1.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-inherit/download/rework-inherit-0.1.5.tgz"},"_from":".","_npmVersion":"1.2.28","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"michelle","email":"michelle@michellebu.com"}],"directories":{},"publish_time":1370920133490,"_cnpm_publish_time":1370920133490,"_hasShrinkwrap":false},"0.1.4":{"name":"rework-inherit","description":"Inherit rules from other selectors","version":"0.1.4","peerDependencies":{"rework":">= 0.15.0"},"devDependencies":{"rework":">= 0.15.0"},"scripts":{"test":"node test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/jonathanong/rework-inherit.git"},"bugs":{"url":"https://github.com/jonathanong/rework-inherit/issues","email":"me@jongleberry.com"},"license":"MIT","readmeFilename":"README.md","_id":"rework-inherit@0.1.4","dist":{"shasum":"b6b2a9e62f4ae65c9ef4a6b2f55b66a8c25bc655","size":3742,"noattachment":false,"key":"/rework-inherit/-/rework-inherit-0.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-inherit/download/rework-inherit-0.1.4.tgz"},"_from":".","_npmVersion":"1.2.28","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"michelle","email":"michelle@michellebu.com"}],"directories":{},"publish_time":1370918994190,"_cnpm_publish_time":1370918994190,"_hasShrinkwrap":false},"0.1.3":{"name":"rework-inherit","description":"Inherit rules from other selectors","version":"0.1.3","peerDependencies":{"rework":"*"},"devDependencies":{"rework":"*"},"scripts":{"test":"node test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/jonathanong/rework-inherit.git"},"bugs":{"url":"https://github.com/jonathanong/rework-inherit/issues","email":"me@jongleberry.com"},"license":"MIT","readmeFilename":"README.md","_id":"rework-inherit@0.1.3","dist":{"shasum":"0e4840f0b135ba5dd7f8f6ec65a4c89f8035fc18","size":3721,"noattachment":false,"key":"/rework-inherit/-/rework-inherit-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-inherit/download/rework-inherit-0.1.3.tgz"},"_from":".","_npmVersion":"1.2.24","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"michelle","email":"michelle@michellebu.com"}],"directories":{},"publish_time":1370281116189,"_cnpm_publish_time":1370281116189,"_hasShrinkwrap":false},"0.1.2":{"name":"rework-inherit","description":"Inherit rules from other selectors","version":"0.1.2","peerDependencies":{"rework":"*"},"devDependencies":{"rework":">= 0.14.0"},"scripts":{"test":"node test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/jonathanong/rework-inherit.git"},"bugs":{"url":"https://github.com/jonathanong/rework-inherit/issues","email":"me@jongleberry.com"},"license":"MIT","readmeFilename":"README.md","_id":"rework-inherit@0.1.2","dist":{"shasum":"51bb1f0a127909888228d779f3fdb10c064ec8e2","size":3723,"noattachment":false,"key":"/rework-inherit/-/rework-inherit-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-inherit/download/rework-inherit-0.1.2.tgz"},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"michelle","email":"michelle@michellebu.com"}],"directories":{},"publish_time":1369090045417,"_cnpm_publish_time":1369090045417,"_hasShrinkwrap":false},"0.1.1":{"name":"rework-inherit","description":"Inherit rules from other selectors","version":"0.1.1","peerDependencies":{"rework":"*"},"devDependencies":{"rework":">= 0.14.0"},"scripts":{"test":"node test"},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"https://github.com/jonathanong/rework-inherit.git"},"bugs":{"url":"https://github.com/jonathanong/rework-inherit/issues","email":"me@jongleberry.com"},"license":"WTFPL","readmeFilename":"README.md","_id":"rework-inherit@0.1.1","dist":{"shasum":"c4e46816dc3831177ce7cdcbf8833b87d11f346f","size":3094,"noattachment":false,"key":"/rework-inherit/-/rework-inherit-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-inherit/download/rework-inherit-0.1.1.tgz"},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"michelle","email":"michelle@michellebu.com"}],"directories":{},"publish_time":1368677976049,"_cnpm_publish_time":1368677976049,"_hasShrinkwrap":false},"0.1.0":{"name":"rework-inherit","description":"Inherit rules from other selectors","version":"0.1.0","peerDependencies":{"rework":">= 0.13.2"},"readmeFilename":"README.md","_id":"rework-inherit@0.1.0","dist":{"shasum":"f0b22e8ccbf29632229d8f11cfcb8e4b28e9d937","size":2866,"noattachment":false,"key":"/rework-inherit/-/rework-inherit-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-inherit/download/rework-inherit-0.1.0.tgz"},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"michelle","email":"michelle@michellebu.com"}],"directories":{},"publish_time":1365208514693,"_cnpm_publish_time":1365208514693,"_hasShrinkwrap":false},"0.0.2":{"name":"rework-inherit","description":"Inherit rules from other selectors","version":"0.0.2","peerDependencies":{"rework":"*"},"readmeFilename":"README.md","_id":"rework-inherit@0.0.2","dist":{"shasum":"adcedd6f5ac471e4ae74ddfdce3d8b1490f571c3","size":2440,"noattachment":false,"key":"/rework-inherit/-/rework-inherit-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-inherit/download/rework-inherit-0.0.2.tgz"},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"michelle","email":"michelle@michellebu.com"}],"directories":{},"publish_time":1363313058979,"_cnpm_publish_time":1363313058979,"_hasShrinkwrap":false},"0.0.1":{"name":"rework-inherit","description":"Inherit rules from other selectors","version":"0.0.1","peerDependencies":{"rework":"*"},"readmeFilename":"README.md","_id":"rework-inherit@0.0.1","dist":{"shasum":"8035d0ca9efa50d4c65d27f109b3fc572cdcef97","size":1141,"noattachment":false,"key":"/rework-inherit/-/rework-inherit-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/rework-inherit/download/rework-inherit-0.0.1.tgz"},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"michelle","email":"michelle@michellebu.com"}],"directories":{},"publish_time":1363268231566,"_cnpm_publish_time":1363268231566,"_hasShrinkwrap":false}},"readme":"## Inherit [![Build Status](https://travis-ci.org/reworkcss/rework-inherit.png)](https://travis-ci.org/reworkcss/rework-inherit)\n\nInherit mixin for [rework](https://github.com/visionmedia/rework).\nAllows you to inherit __all__ the rules associated with a given selector.\n\n### API\n\n```js\nvar inherit = require('rework-inherit')\n\nvar css = rework(inputCSS)\n  .use(inherit())\n  .toString()\n```\n\n#### Inherit(options{})\n\nOption parameters:\n\n* `propertyRegExp` - Regular expression to match the \"inherit\" property.\n  By default, it is `/^(inherit|extend)s?$/i`, so it matches \"inherit\", \"inherits\", \"extend\", and \"extends\".\n  For example, if you only want to allow the `extend` keyword,\n  set the regular expression to `/^extend$/`.\n\n### Examples\n\n#### Regular inherit\n\n```css\n.gray {\n  color: gray;\n}\n\n.text {\n  inherit: .gray;\n}\n```\n\nyields:\n\n```css\n.gray,\n.text {\n  color: gray;\n}\n```\n\n#### Multiple inherit\n\nInherit multiple selectors at the same time.\n\n```css\n.gray {\n  color: gray;\n}\n\n.black {\n  color: black;\n}\n\n.button {\n  inherit: .gray, .black;\n}\n```\n\nyields:\n\n```css\n.gray,\n.button {\n  color: gray;\n}\n\n.black,\n.button {\n  color: black;\n}\n```\n\n#### Placeholders\n\nAny selector that includes a `%` is considered a placeholder.\nPlaceholders will not be output in the final CSS.\n\n```css\n%gray {\n  color: gray;\n}\n\n.text {\n  inherit: %gray;\n}\n```\n\nyields:\n\n```css\n.text {\n  color: gray;\n}\n```\n\n#### Partial selectors\n\nIf you inherit a selector,\nall rules that include that selector will be included as well.\n\n```css\ndiv button span {\n  color: red;\n}\n\ndiv button {\n  color: green;\n}\n\nbutton span {\n  color: pink;\n}\n\n.button {\n  inherit: button;\n}\n\n.link {\n  inherit: div button;\n}\n```\n\nyields:\n\n```css\ndiv button span,\ndiv .button span,\n.link span {\n  color: red;\n}\n\ndiv button,\ndiv .button,\n.link {\n  color: green;\n}\n\nbutton span,\n.button span {\n  color: pink;\n}\n```\n\n#### Chained inheritance\n\n```css\n.button {\n  background-color: gray;\n}\n\n.button-large {\n  inherit: .button;\n  padding: 10px;\n}\n\n.button-large-red {\n  inherit: .button-large;\n  color: red;\n}\n```\n\nyields:\n\n```css\n.button,\n.button-large,\n.button-large-red {\n  background-color: gray;\n}\n\n.button-large,\n.button-large-red {\n  padding: 10px;\n}\n\n.button-large-red {\n  color: red;\n}\n```\n\n#### Media Queries\n\nInheriting from inside a media query will create a copy of the declarations.\nIt will act like a \"mixin\".\nThus, with `%`placeholders, you won't have to use mixins at all.\nEach type of media query will need its own declaration,\nso there will be some inevitable repetition.\n\n```css\n.gray {\n  color: gray\n}\n\n@media (min-width: 320px) {\n  .button {\n    inherit: .gray;\n  }\n}\n\n@media (min-width: 320px) {\n  .link {\n    inherit: .gray;\n  }\n}\n```\n\nyields:\n\n```css\n.gray {\n  color: gray;\n}\n\n@media (min-width: 320px) {\n  .button,\n  .link {\n    color: gray;\n  }\n}\n```\n\n#### Substitute for Nested Syntax\n\nRework doesn't support nested syntax.\nHowever, you can simulate nested syntax with inheritance.\n\n```css\n.no-touchevents %link-hover:hover {\n  text-decoration: underline;\n}\n\na,\nbutton {\n  inherit: %link-hover;\n}\n```\n\nyields:\n\n```css\n.no-touchevents a:hover,\n.no-touchevents button:hover {\n  text-decoration: underline;\n}\n```\n\nThus, you have the features of nested syntax without the nesting.\n\n### Limitations\n\n- You can not inherit a rule that is inside a media query;\n  you can only inherit rules outside a media query.\n  If you find yourself in this situation,\n  just use placeholders instead.\n\n### License\n\nThe MIT License (MIT)\n\nCopyright (c) 2013 Jonathan Ong me@jongleberry.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.","_attachments":{},"bugs":{"url":"https://github.com/reworkcss/rework-inherit/issues","email":"me@jongleberry.com"},"license":"MIT"}