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.

50 lines
882 B

4 years ago
  1. # [postcss][postcss]-merge-longhand
  2. > Merge longhand properties into shorthand with PostCSS.
  3. ## Install
  4. With [npm](https://npmjs.org/package/postcss-merge-longhand) do:
  5. ```
  6. npm install postcss-merge-longhand --save
  7. ```
  8. ## Example
  9. Merge longhand properties into shorthand; works with `margin`, `padding` &
  10. `border`. For more examples see the [tests](src/__tests__/index.js).
  11. ### Input
  12. ```css
  13. h1 {
  14. margin-top: 10px;
  15. margin-right: 20px;
  16. margin-bottom: 10px;
  17. margin-left: 20px;
  18. }
  19. ```
  20. ### Output
  21. ```css
  22. h1 {
  23. margin: 10px 20px;
  24. }
  25. ```
  26. ## Usage
  27. See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for
  28. examples for your environment.
  29. ## Contributors
  30. See [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).
  31. ## License
  32. MIT © [Ben Briggs](http://beneb.info)
  33. [postcss]: https://github.com/postcss/postcss