"readme": "# [postcss][postcss]-discard-duplicates [][ci] [][npm] [][deps]\n\n> Discard duplicate rules in your CSS files with PostCSS.\n\n## Install\n\nWith [npm](https://npmjs.org/package/postcss-discard-duplicates) do:\n\n```\nnpm install postcss-discard-duplicates --save\n```\n\n## Example\n\nThis module will remove all duplicate rules from your stylesheets. It works on\nat rules, normal rules and declarations. Note that this module does not have any\nresponsibility for normalising declarations, selectors or whitespace, so that it\nconsiders these two rules to be different:\n\n```css\nh1, h2 {\n color: blue;\n}\n\nh2, h1 {\n color: blue;\n}\n```\n\nIt has to assume that your rules have already been transformed by another\nprocessor, otherwise it would be responsible for too many things.\n\n### Input\n\n```css\nh1 {\n margin: 0 auto;\n margin: 0 auto\n}\n\nh1 {\n margin: 0 auto\n}\n```\n\n### Output\n\n```css\nh1 {\n margin: 0 auto\n}\n```\n\n## Options\n\n### `retainFirstOccurrence`\n\nType: `Boolean`<br/>\nDefault: `false`\n\nWhen `true`, only the first occurrence of any duplicates found will be retained.\n\nWhen `false`, the last occurrence of any duplicates found will be retained _(this\nis the default behavior)_.\n\n#### Example\n\n> When `retainFirstOccurrence` = `true`.\n\n**Input**\n```css\nh1 {\n margin: 0 auto;\n}\nh2 {\n color: #333;\n}\nh1 {\n margin: 0 auto;\n}\n```\n\n**Output**\n```css\nh1 {\n margin: 0 auto;\n}\nh2 {\n color: #333;\n}\n```\n\n## Usage\n\nSee the [PostCSS documentation](https://github.com/postcss/postcss#usage) for\nexamples for your environment.\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n| [<img src=\"https://avatars.githubusercontent.com/u/1282980?v=3\" width=\"100px;\"/><br /><sub>Ben Briggs</sub>](http://beneb.info)<br />[💻](https://github.com/ben-eb/postcss-discard-duplicates/commits?author=ben-eb) [📖](https://github.com/ben-eb/postcss-discard-duplicates/commits?author=ben-eb) 👀 [⚠️](https://github.com/ben-eb/postcss-discard-duplicates/commits?author=ben-eb) | [<img src=\"https://avatars.githubusercontent.com/u/5635476?v=3\" width=\"100px;\"/><br /><sub>Bogdan Chadkin</sub>](https://github.com/TrySound)<br />[💻](https://github.com/ben-eb/postcss-discard-duplicates/commits?author=TrySound) 👀 [⚠️](https://github.com/ben-eb/postcss-discard-duplicates/commits?author=TrySound) | [<img src=\"https://avatars.githubusercontent.com/u/68302?v=3\" width=\"100px;\"/><br /><sub>Lee Houghton</sub>](https://github.com/asztal)<br />[💻](https://github.com/ben-eb/postcss-discard-duplicates/commits?author=asztal) | [<img src=\"https://avatars.githubusercontent.com/u/1737375?v=3\" width=\"100px;\"/><br /><sub>Andy Jansson</sub>](https://github.com/andyjansson)<br />[💻](https://github.com/ben-eb/postcss-discard-duplicates/commits?author=andyjansson) [⚠️](https://github.com/ben-eb/postcss-discard-duplicates/commits?author=andyjansson) |\n| :---: | :---: | :---: | :---: |\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors] specification. Contributions of\nany kind welcome!\n\n## License\n\nMIT © [Ben Briggs](http://beneb.info)\n\n\n[all-contributors]: https://github.com/kentcdodds/all-contributors\n[ci]: https://travis-ci.org/ben-eb/postcss-discard-duplicates\n[deps]: https://gemnasium.com/ben-eb/postcss-discard-duplicates\n[npm]: http://badge.fury.io/js/postcss-discard-duplicates\n[postcss]: https://github.com/postcss/postcss\n",
0 commit comments