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.

45 lines
806 B

4 years ago
  1. # [postcss][postcss]-colormin
  2. > Minify colors in your CSS files with PostCSS.
  3. ## Install
  4. With [npm](https://npmjs.org/package/postcss-colormin) do:
  5. ```
  6. npm install postcss-colormin --save
  7. ```
  8. ## Example
  9. ```js
  10. var postcss = require('postcss')
  11. var colormin = require('postcss-colormin');
  12. var css = 'h1 {color: rgba(255, 0, 0, 1)}';
  13. console.log(postcss(colormin()).process(css).css);
  14. // => 'h1 {color:red}'
  15. ```
  16. For more examples see the [tests](src/__tests__/index.js).
  17. ## Usage
  18. See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for
  19. examples for your environment.
  20. ## Contributors
  21. See [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).
  22. ## License
  23. MIT © [Ben Briggs](http://beneb.info)
  24. [postcss]: https://github.com/postcss/postcss