d77ceec83569ca27a3173c00ee0fc0fa51bd5c211ed7c6ff0cc08d69b18c200ff92497cdc5896324f4a931c1f3714d8a02c1fae9a0a06ec66dd50596751e1f 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # [postcss][postcss]-merge-idents [![Build Status](https://travis-ci.org/ben-eb/postcss-merge-idents.svg?branch=master)][ci] [![NPM version](https://badge.fury.io/js/postcss-merge-idents.svg)][npm] [![Dependency Status](https://gemnasium.com/ben-eb/postcss-merge-idents.svg)][deps]
  2. > Merge keyframe and counter style identifiers.
  3. ## Install
  4. With [npm](https://npmjs.org/package/postcss-merge-idents) do:
  5. ```
  6. npm install postcss-merge-idents --save
  7. ```
  8. ## Example
  9. This module will merge identifiers such as `@keyframes` and `@counter-style`,
  10. if their properties are identical. Then, it will update those declarations that
  11. depend on the duplicated property.
  12. ### Input
  13. ```css
  14. @keyframes rotate {
  15. from { transform: rotate(0) }
  16. to { transform: rotate(360deg) }
  17. }
  18. @keyframes flip {
  19. from { transform: rotate(0) }
  20. to { transform: rotate(360deg) }
  21. }
  22. .rotate {
  23. animation-name: rotate
  24. }
  25. .flip {
  26. animation-name: flip
  27. }
  28. ```
  29. ### Output
  30. ```css
  31. @keyframes flip {
  32. from { transform: rotate(0) }
  33. to { transform: rotate(360deg) }
  34. }
  35. .rotate {
  36. animation-name: flip
  37. }
  38. .flip {
  39. animation-name: flip
  40. }
  41. ```
  42. ## Usage
  43. See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for
  44. examples for your environment.
  45. ## Contributing
  46. Pull requests are welcome. If you add functionality, then please add unit tests
  47. to cover it.
  48. ## License
  49. MIT © [Ben Briggs](http://beneb.info)
  50. [ci]: https://travis-ci.org/ben-eb/postcss-merge-idents
  51. [deps]: https://gemnasium.com/ben-eb/postcss-merge-idents
  52. [npm]: http://badge.fury.io/js/postcss-merge-idents
  53. [postcss]: https://github.com/postcss/postcss