5e47ea1964e4b8e4f9fd048f25a11f97b0acfd7dd38ba1ac34b4ade6cb511af01a0b637d2db1fbd5f6d281fce1810d3f6fe979c6b5e6db46ac968660ad3507 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # [postcss][postcss]-reduce-initial [![Build Status](https://travis-ci.org/ben-eb/postcss-reduce-initial.svg?branch=master)][ci] [![NPM version](https://badge.fury.io/js/postcss-reduce-initial.svg)][npm] [![Dependency Status](https://gemnasium.com/ben-eb/postcss-reduce-initial.svg)][deps]
  2. > Reduce `initial` definitions to the *actual* initial value, where possible.
  3. ## Install
  4. With [npm](https://npmjs.org/package/postcss-reduce-initial) do:
  5. ```
  6. npm install postcss-reduce-initial --save
  7. ```
  8. ## Example
  9. This module will replace the `initial` CSS keyword with the *actual* value,
  10. when this value is smaller than the `initial` definition itself. For example,
  11. the initial value for the `min-width` property is `0`; therefore, these two
  12. definitions are equivalent;
  13. ### Input
  14. ```css
  15. h1 {
  16. min-width: initial;
  17. }
  18. ```
  19. ### Output
  20. ```css
  21. h1 {
  22. min-width: 0;
  23. }
  24. ```
  25. See the [data](data/values.json) for more conversions. This data is courtesy
  26. of Mozilla.
  27. ## Usage
  28. See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for
  29. examples for your environment.
  30. ## Contributors
  31. Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
  32. <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
  33. | [<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-reduce-initial/commits?author=ben-eb) [📖](https://github.com/ben-eb/postcss-reduce-initial/commits?author=ben-eb) 👀 [⚠️](https://github.com/ben-eb/postcss-reduce-initial/commits?author=ben-eb) | [<img src="https://avatars.githubusercontent.com/u/551712?v=3" width="100px;"/><br /><sub>Chris Walker</sub>](http://thechriswalker.github.com/)<br />[🐛](https://github.com/ben-eb/postcss-reduce-initial/issues?q=author%3Athechriswalker) [💻](https://github.com/ben-eb/postcss-reduce-initial/commits?author=thechriswalker) |
  34. | :---: | :---: |
  35. <!-- ALL-CONTRIBUTORS-LIST:END -->
  36. This project follows the [all-contributors] specification. Contributions of
  37. any kind welcome!
  38. ## License
  39. [Template:CSSData] by Mozilla Contributors is licensed under [CC-BY-SA 2.5].
  40. [Template:CSSData]: https://developer.mozilla.org/en-US/docs/Template:CSSData
  41. [CC-BY-SA 2.5]: http://creativecommons.org/licenses/by-sa/2.5/
  42. MIT © [Ben Briggs](http://beneb.info)
  43. [all-contributors]: https://github.com/kentcdodds/all-contributors
  44. [ci]: https://travis-ci.org/ben-eb/postcss-reduce-initial
  45. [deps]: https://gemnasium.com/ben-eb/postcss-reduce-initial
  46. [npm]: http://badge.fury.io/js/postcss-reduce-initial
  47. [postcss]: https://github.com/postcss/postcss