项目原始demo,不改动
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # [postcss][postcss]-discard-duplicates [![Build Status](https://travis-ci.org/ben-eb/postcss-discard-duplicates.svg?branch=master)][ci] [![NPM version](https://badge.fury.io/js/postcss-discard-duplicates.svg)][npm] [![Dependency Status](https://gemnasium.com/ben-eb/postcss-discard-duplicates.svg)][deps]
  2. > Discard duplicate rules in your CSS files with PostCSS.
  3. ## Install
  4. With [npm](https://npmjs.org/package/postcss-discard-duplicates) do:
  5. ```
  6. npm install postcss-discard-duplicates --save
  7. ```
  8. ## Example
  9. This module will remove all duplicate rules from your stylesheets. It works on
  10. at rules, normal rules and declarations. Note that this module does not have any
  11. responsibility for normalising declarations, selectors or whitespace, so that it
  12. considers these two rules to be different:
  13. ```css
  14. h1, h2 {
  15. color: blue;
  16. }
  17. h2, h1 {
  18. color: blue;
  19. }
  20. ```
  21. It has to assume that your rules have already been transformed by another
  22. processor, otherwise it would be responsible for too many things.
  23. ### Input
  24. ```css
  25. h1 {
  26. margin: 0 auto;
  27. margin: 0 auto
  28. }
  29. h1 {
  30. margin: 0 auto
  31. }
  32. ```
  33. ### Output
  34. ```css
  35. h1 {
  36. margin: 0 auto
  37. }
  38. ```
  39. ## Usage
  40. See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for
  41. examples for your environment.
  42. ## Contributors
  43. Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
  44. <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
  45. | [<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) |
  46. | :---: | :---: | :---: | :---: |
  47. <!-- ALL-CONTRIBUTORS-LIST:END -->
  48. This project follows the [all-contributors] specification. Contributions of
  49. any kind welcome!
  50. ## License
  51. MIT © [Ben Briggs](http://beneb.info)
  52. [all-contributors]: https://github.com/kentcdodds/all-contributors
  53. [ci]: https://travis-ci.org/ben-eb/postcss-discard-duplicates
  54. [deps]: https://gemnasium.com/ben-eb/postcss-discard-duplicates
  55. [npm]: http://badge.fury.io/js/postcss-discard-duplicates
  56. [postcss]: https://github.com/postcss/postcss