{"_id":"postcss-simple-extend","_rev":"12-c5ca8515b30bdc5f3c2df5851e88c3e1","name":"postcss-simple-extend","description":"Simple extends for PostCSS","dist-tags":{"latest":"1.0.0"},"versions":{"0.1.0":{"name":"postcss-simple-extend","author":{"name":"David Clark","email":"david.dave.clark@gmail.com","url":"http://davidtheclark.com"},"license":"MIT","version":"0.1.0","description":"Simple extends for PostCSS","homepage":"https://github.com/davidtheclark/postcss-simple-extend","repository":{"type":"git","url":"https://github.com/davidtheclark/postcss-simple-extend.git"},"keywords":["css","postcss","postcss-plugin","mixin","clone","extend"],"files":["index.js","LICENSE","README.md","CHANGELOG.md"],"main":"index.js","scripts":{"lint":"eslint index.js test/index.js","test":"npm run lint && tape test"},"dependencies":{"postcss":"^4.0.0"},"devDependencies":{"eslint":"^0.12.0","tape":"^3.4.0"},"gitHead":"95c100bcf02e3fde189b7e69133c7734073c9528","bugs":{"url":"https://github.com/davidtheclark/postcss-simple-extend/issues"},"_id":"postcss-simple-extend@0.1.0","_shasum":"fd515d1939acc3bd4a796084ed2f021ab0b75614","_from":".","_npmVersion":"2.2.0","_nodeVersion":"0.10.35","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"maintainers":[{"name":"davidtheclark","email":"david.dave.clark@gmail.com"}],"dist":{"shasum":"fd515d1939acc3bd4a796084ed2f021ab0b75614","tarball":"https://registry.npmjs.org/postcss-simple-extend/-/postcss-simple-extend-0.1.0.tgz","integrity":"sha512-69kypUesWWvtTmdcp6xAq83iKA60M/aBkSn2m0pc8OBHO/asHQ0BjVW4mSWdkYaf+y5IOmMbGpR+P4GaJlMRNg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNkOmLCbjTI91N+JcaeKIBSoGAD18VMwLYcDjAmGBjoAIhANYsr5POS/HWDBTym9Gz8GzxlUBMe7TBLEcSuS81zpOi"}]}},"0.1.1":{"name":"postcss-simple-extend","author":{"name":"David Clark","email":"david.dave.clark@gmail.com","url":"http://davidtheclark.com"},"license":"MIT","version":"0.1.1","description":"Simple extends for PostCSS","homepage":"https://github.com/davidtheclark/postcss-simple-extend","repository":{"type":"git","url":"https://github.com/davidtheclark/postcss-simple-extend.git"},"keywords":["css","postcss","postcss-plugin","mixin","clone","extend"],"files":["index.js","LICENSE","README.md","CHANGELOG.md"],"main":"index.js","scripts":{"lint":"eslint index.js test/index.js","test":"npm run lint && tape test"},"dependencies":{"postcss":"^4.0.0"},"devDependencies":{"eslint":"^0.12.0","tape":"^3.4.0"},"gitHead":"23b87e73c14ab358e42eef5924a1c4ecf15c326e","bugs":{"url":"https://github.com/davidtheclark/postcss-simple-extend/issues"},"_id":"postcss-simple-extend@0.1.1","_shasum":"26b6a0f5fe3235f882368d8211022823ce5a6dbe","_from":".","_npmVersion":"2.3.0","_nodeVersion":"0.10.35","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"maintainers":[{"name":"davidtheclark","email":"david.dave.clark@gmail.com"}],"dist":{"shasum":"26b6a0f5fe3235f882368d8211022823ce5a6dbe","tarball":"https://registry.npmjs.org/postcss-simple-extend/-/postcss-simple-extend-0.1.1.tgz","integrity":"sha512-MA/wNcevnrzCo0QXLqewmh0bchz8ikWPL0VHU0BZGSctnANhJsXNTEr+5qoRE4yBYsdYHRty1IDHzVKQbtYZtg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA9pD863wJz3lLiyv18uwHCiYV62x0HuB//EvfFFSWU2AiAVjTdAYZVRaUiK9bcN0b/jBcrsijbWvbKuMhAbkoz7gg=="}]}},"0.2.0":{"name":"postcss-simple-extend","author":{"name":"David Clark","email":"david.dave.clark@gmail.com","url":"http://davidtheclark.com"},"license":"MIT","version":"0.2.0","description":"Simple extends for PostCSS","homepage":"https://github.com/davidtheclark/postcss-simple-extend","repository":{"type":"git","url":"https://github.com/davidtheclark/postcss-simple-extend.git"},"keywords":["css","postcss","postcss-plugin","mixin","clone","extend"],"files":["index.js","LICENSE","README.md","CHANGELOG.md"],"main":"index.js","scripts":{"lint":"eslint index.js test/index.js","test":"npm run lint && tape test"},"dependencies":{"postcss":"^4.0.0"},"devDependencies":{"eslint":"0.17.0","tape":"3.5.0"},"gitHead":"f4122523e1a157daa963ef5a840401095ba5ea44","bugs":{"url":"https://github.com/davidtheclark/postcss-simple-extend/issues"},"_id":"postcss-simple-extend@0.2.0","_shasum":"fc4e8a5102beb931190437b0eafff619d24be75a","_from":".","_npmVersion":"2.7.1","_nodeVersion":"0.12.0","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"maintainers":[{"name":"davidtheclark","email":"david.dave.clark@gmail.com"}],"dist":{"shasum":"fc4e8a5102beb931190437b0eafff619d24be75a","tarball":"https://registry.npmjs.org/postcss-simple-extend/-/postcss-simple-extend-0.2.0.tgz","integrity":"sha512-KDh+U7kzXYqGInMpdU+ikOPAKbSEDz25YB+A12D417LufTPs7Qu8gPYQ8sv5LEVQzQuPTQ7K6nKUEyyb+GlJMg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTgtX0AUhjPBZ2Z1aLeRuRXA8dW6V8fZPi8VmzPlT5xwIhAJIPRUR7Ez172O4k/96t66tdOSzE4pVRYYQCtiuM9ocL"}]}},"0.3.0":{"name":"postcss-simple-extend","author":{"name":"David Clark","email":"david.dave.clark@gmail.com","url":"http://davidtheclark.com"},"license":"MIT","version":"0.3.0","description":"Simple extends for PostCSS","homepage":"https://github.com/davidtheclark/postcss-simple-extend","repository":{"type":"git","url":"https://github.com/davidtheclark/postcss-simple-extend.git"},"keywords":["css","postcss","postcss-plugin","mixin","clone","extend"],"files":["index.js","LICENSE","README.md","CHANGELOG.md"],"main":"index.js","scripts":{"lint":"eslint index.js test/index.js","test":"npm run lint && tape test"},"dependencies":{"postcss":"^4.1.0"},"devDependencies":{"eslint":"0.18.0","tape":"4.0.0"},"gitHead":"d277d9c3a815d392900c17f7ec5bfc665e5a4890","bugs":{"url":"https://github.com/davidtheclark/postcss-simple-extend/issues"},"_id":"postcss-simple-extend@0.3.0","_shasum":"5b117e4958a153a044db889a52090dc2b6b8ebd6","_from":".","_npmVersion":"2.7.4","_nodeVersion":"0.12.1","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"maintainers":[{"name":"davidtheclark","email":"david.dave.clark@gmail.com"}],"dist":{"shasum":"5b117e4958a153a044db889a52090dc2b6b8ebd6","tarball":"https://registry.npmjs.org/postcss-simple-extend/-/postcss-simple-extend-0.3.0.tgz","integrity":"sha512-0ZrXCYlp3rzgZ5wF5R9R+kanprEfaKNki/UKwvoeMyHH7HKIz+ijV0XtGssLafrrcZL2Mj2SH44YWSloxyCGZw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGtn6L/xDkeMFkkTF6gyzompn6ZOLVGi4bn2C9tGEEsHAiBTy3QTBr8knrK6ZZ2S6QRJ6tZ3fMuWB/G9B4XJ8yi2Fw=="}]}},"0.3.1":{"name":"postcss-simple-extend","author":{"name":"David Clark","email":"david.dave.clark@gmail.com","url":"http://davidtheclark.com"},"license":"MIT","version":"0.3.1","description":"Simple extends for PostCSS","homepage":"https://github.com/davidtheclark/postcss-simple-extend","repository":{"type":"git","url":"https://github.com/davidtheclark/postcss-simple-extend.git"},"keywords":["css","postcss","postcss-plugin","mixin","clone","extend"],"files":["index.js","LICENSE","README.md","CHANGELOG.md"],"main":"index.js","scripts":{"lint":"eslint index.js test/index.js","test":"npm run lint && tape test"},"dependencies":{"postcss":"^4.1.0"},"devDependencies":{"eslint":"0.18.0","tape":"4.0.0"},"gitHead":"90fe7f85ce02312cf31d015c860c99dd8cf8b72f","bugs":{"url":"https://github.com/davidtheclark/postcss-simple-extend/issues"},"_id":"postcss-simple-extend@0.3.1","_shasum":"b8773a416bf0ea6455891405de1f4e40f70d68d8","_from":".","_npmVersion":"2.7.6","_nodeVersion":"0.12.2","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"maintainers":[{"name":"davidtheclark","email":"david.dave.clark@gmail.com"}],"dist":{"shasum":"b8773a416bf0ea6455891405de1f4e40f70d68d8","tarball":"https://registry.npmjs.org/postcss-simple-extend/-/postcss-simple-extend-0.3.1.tgz","integrity":"sha512-4DU14solAUJ841YgicqiI6NfVZs60bH05rsrRRrB93dFYPnTeFoFkbMUb+2qoHrML2moXD0i4RAjY00N/K6wYg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHk5fiZxknBPp+6kbQU4CEUA6ixWxEs7JYtcEdNH0cbTAiEAjIZ/F0qzJmS1Nhsl9E8FrcgfRRAftLqSiQpisafVKbs="}]}},"0.3.2":{"name":"postcss-simple-extend","author":{"name":"David Clark","email":"david.dave.clark@gmail.com","url":"http://davidtheclark.com"},"license":"MIT","version":"0.3.2","description":"Simple extends for PostCSS","homepage":"https://github.com/davidtheclark/postcss-simple-extend","repository":{"type":"git","url":"git+https://github.com/davidtheclark/postcss-simple-extend.git"},"keywords":["css","postcss","postcss-plugin","mixin","clone","extend"],"files":["index.js","LICENSE","README.md","CHANGELOG.md"],"main":"index.js","scripts":{"lint":"eslint index.js test/index.js","test":"npm run lint && tape test"},"dependencies":{"postcss":"^4.1.0"},"devDependencies":{"eslint":"0.24.1","tape":"4.0.0"},"gitHead":"060c11bee26dbc4b2bc1594b944f22cda994b472","bugs":{"url":"https://github.com/davidtheclark/postcss-simple-extend/issues"},"_id":"postcss-simple-extend@0.3.2","_shasum":"5fc852f15747de5c5907d0c896550d8a2401ffc0","_from":".","_npmVersion":"2.12.1","_nodeVersion":"0.12.6","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"maintainers":[{"name":"davidtheclark","email":"david.dave.clark@gmail.com"}],"dist":{"shasum":"5fc852f15747de5c5907d0c896550d8a2401ffc0","tarball":"https://registry.npmjs.org/postcss-simple-extend/-/postcss-simple-extend-0.3.2.tgz","integrity":"sha512-SVEX601ssvnG6YMqa7Og8maerGgCTw0EU/wmhOj5drDvC4XWm6BBOfk3WtvvxaGkQQIGATkjZ0mHhQfRot4w6w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEFcvlrHLS5/kxfLTPRB3aEjOqYOetaKYxMD6XQAsPw8AiAZcbVy5M4tJRPU+SM7Af9NZnH6dhs2/qi7Xe8P1Jtr9w=="}]}},"1.0.0":{"name":"postcss-simple-extend","author":{"name":"David Clark","email":"david.dave.clark@gmail.com","url":"http://davidtheclark.com"},"license":"MIT","version":"1.0.0","description":"Simple extends for PostCSS","homepage":"https://github.com/davidtheclark/postcss-simple-extend","repository":{"type":"git","url":"git+https://github.com/davidtheclark/postcss-simple-extend.git"},"keywords":["css","postcss","postcss-plugin","mixin","clone","extend"],"files":["index.js","LICENSE","README.md","CHANGELOG.md"],"main":"index.js","scripts":{"lint":"eslint index.js test/index.js","test":"npm run lint && tape test"},"dependencies":{"postcss":"^5.0.0"},"devDependencies":{"eslint":"1.2.1","tape":"4.2.0"},"gitHead":"4b8a07e6e7f4f0a30ac6d1d611f05de7dff6ab05","bugs":{"url":"https://github.com/davidtheclark/postcss-simple-extend/issues"},"_id":"postcss-simple-extend@1.0.0","_shasum":"7d369c4ee1c0df752c252f4a3d82aab81309c29e","_from":".","_npmVersion":"2.13.2","_nodeVersion":"0.12.7","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"7d369c4ee1c0df752c252f4a3d82aab81309c29e","tarball":"https://registry.npmjs.org/postcss-simple-extend/-/postcss-simple-extend-1.0.0.tgz","integrity":"sha512-mMGhLpyPxtPozirsSebHz9xjWOIBbbAGOViSZjOt26QVxYbjDuz8WTcKKXitd17rF4Vy3kW52ySEdv5ZjIuCOQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDBVsygROT+nA0Clg7+YKTZA4AFgr8XgeoGZWTzPB8/2AiBvdGWQsrTJECUljZkD2cpT0JZ7wihHLZDO86Vk2do3Jw=="}]},"maintainers":[{"name":"davidtheclark","email":"david.dave.clark@gmail.com"}]}},"readme":"# postcss-simple-extend [![Build Status](https://travis-ci.org/davidtheclark/postcss-simple-extend.svg?branch=master)](https://travis-ci.org/davidtheclark/postcss-simple-extend)\n\n**A [PostCSS](https://github.com/postcss/postcss) plugin that enables you to extend placeholder selectors in CSS.**\n\nUse this plugin to define a rule set with an abstract, extendable selector — a \"placeholder selector\" — to which you can, later on, add concrete selectors from other rule sets.\n\nThe functionality should mirror Sass's `@extend` with `%` placeholders (a.k.a. \"silent classes\").\nUnlike Sass's `@extend`, however, *this plugin does not enable you to extend real selectors*: i.e. you cannot `@extend .classname` or `@extend ul > li + li > span a`.\nThat key difference makes this plugin *much* more simple, and arguably much less dangerous.\nMany of the potential problems with Sass's `@extend` simply do not apply to this limited, more *simple* version. Smart Sass users often recommend to only ever `@extend` placeholders (cf. [Harry Robert](http://csswizardry.com/2014/01/extending-silent-classes-in-sass/) and [Hugo Giraudel](http://sass-guidelin.es/#extend)): *with this plugin, that recommendation is enforced*.\n\nIf you are looking for a more full-featured `@extend`, check out [`postcss-extend`](https://github.com/travco/postcss-extend).\n\n> **A Note on \"mixins\" & \"extends\"**: Mixins copy declarations from an abstract definition into a concrete rule set. The simple extend supported by this plugin clones a concrete rule set's selector and adds it to an abstract placeholder selector. If you would like to use mixins, as well — or instead — have a look at [`postcss-mixins`](https://github.com/postcss/postcss-mixins).\n>\n> Also think about this: *Should* you use an `@extend` instead of a `@mixin`? The answer: *maybe not*. Given the fact that [`@extend`s don't actually reduce generated file size (after gzip)](https://tech.bellycard.com/blog/sass-mixins-vs-extends-the-data/), and the CSS generated by mixins is easier to read and understand, *you might not want to introduce `@extend`s to your codebase*. Just consider.\n\n## Installation\n\n```\nnpm install postcss-simple-extend --save\n```\n\nThis plugin is compatible with PostCSS v4.1+.\n\n## Example Input-Output\n\nInput:\n```css\n@define-placeholder gigantic {\n  font-size: 40em;\n}\n\n.foo {\n  @extend gigantic;\n  color: red;\n}\n\n.bar {\n  @extend gigantic;\n  color: orange;\n}\n```\n\nOutput:\n```css\n.foo,\n.bar {\n  font-size: 40em;\n}\n\n.foo {\n  color: red;\n}\n\n.bar {\n  color: orange;\n}\n```\n\n## Usage\n\n### Define Your Placeholder\n\nWith `@define-placeholder`, you associate a rule set with a placeholder selector, which you will later extend with concrete selectors.\n\nYou can also use `@define-extend` or `@simple-extend-define`, if either of those better fits your mind and situation.\n\n```css\n@define-placeholder simple-list {\n  list-style-type: none;\n  margin: 0;\n  padding: 0;\n}\n/* or @define-extend simple-list {...} */\n/* or @simple-extend-define simple-list {...} */\n```\n\n`@define-placeholder` at-rules, and the placeholder names (e.g. `simple-list`, above), will be removed entirely from the generated CSS, replaced by the selectors you've added via `@extend` (see example above).\n\nThere are some defining guidelines to obey (violations should log warnings):\n- Definitions must occur at the root level (i.e. not inside statements, such as rule sets or `@media` blocks).\n- Definitions should only contain declarations and comments: no statements.\n\n### Extend a Placeholder (Add Selectors to It)\n\nUse the at-rule `@extend` within a rule set to add that rule set's selector(s) to a placeholder (which was defined via `@define-placeholder`).\n\nYou can also use `@simple-extend-addto`, if that better fits your mind and situation.\n\n```css\n.list-i-want-to-be-simple {\n  @extend simple-list;\n  /* or @simple-extend-addto simple-list; */\n  font-size: 40em;\n}\n```\n\nAnd there are some `@extend` guidelines to obey (violations should log warnings):\n- `@extend` must *not* occur at the root level: only inside rule sets.\n- `@extend` must *not* occur within `@media` statements. (The generated code almost certainly would not match your intention.)\n- The placeholder must be defined *before* `@extend` can refer to it.\n\n### Plug it in to PostCSS\n\nPlug it in just like any other PostCSS plugin. There are no frills and no options, so integration should be straightforward. For example (as a node script):\n\n```js\nvar fs = require('fs');\nvar postcss = require('postcss');\nvar simpleExtend = require('postcss-simple-extend');\n\nvar inputCss = fs.readFileSync('input.css', 'utf8');\n\nvar outputCss = postcss()\n  .use(simpleExtend())\n  // or .use(simpleExtend)\n  .process(inputCss)\n  .css;\n\nconsole.log(outputCss);\n```\n\nOr take advantage of [any of the myriad other ways to consume PostCSS](https://github.com/postcss/postcss#usage), and follow the plugin instructions they provide.\n","maintainers":[{"name":"davidtheclark","email":"david.dave.clark@gmail.com"}],"time":{"modified":"2022-06-24T10:56:01.129Z","created":"2015-01-24T15:09:29.566Z","0.1.0":"2015-01-24T15:09:29.566Z","0.1.1":"2015-01-27T00:45:55.882Z","0.2.0":"2015-03-15T00:53:18.130Z","0.3.0":"2015-04-08T02:14:33.798Z","0.3.1":"2015-04-12T22:55:23.974Z","0.3.2":"2015-07-11T19:57:16.443Z","1.0.0":"2015-08-27T00:27:30.820Z"},"homepage":"https://github.com/davidtheclark/postcss-simple-extend","keywords":["css","postcss","postcss-plugin","mixin","clone","extend"],"repository":{"type":"git","url":"git+https://github.com/davidtheclark/postcss-simple-extend.git"},"author":{"name":"David Clark","email":"david.dave.clark@gmail.com","url":"http://davidtheclark.com"},"bugs":{"url":"https://github.com/davidtheclark/postcss-simple-extend/issues"},"license":"MIT","readmeFilename":"README.md"}