项目原始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.

README.md 1.3 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # [postcss][postcss]-merge-longhand [![Build Status](https://travis-ci.org/ben-eb/postcss-merge-longhand.svg?branch=master)][ci] [![NPM version](https://badge.fury.io/js/postcss-merge-longhand.svg)][npm] [![Dependency Status](https://gemnasium.com/ben-eb/postcss-merge-longhand.svg)][deps]
  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. ## Contributing
  30. Pull requests are welcome. If you add functionality, then please add unit tests
  31. to cover it.
  32. ## License
  33. MIT © [Ben Briggs](http://beneb.info)
  34. [ci]: https://travis-ci.org/ben-eb/postcss-merge-longhand
  35. [deps]: https://gemnasium.com/ben-eb/postcss-merge-longhand
  36. [npm]: http://badge.fury.io/js/postcss-merge-longhand
  37. [postcss]: https://github.com/postcss/postcss