postcss-minify-gradients
Minify gradient parameters with PostCSS.
Last updated 9 years ago by beneb .
MIT · Repository · Bugs · Original npm
$ cnpm install postcss-minify-gradients 
SYNC missed versions from official npm registry.

postcss-minify-gradients

Minify gradient parameters with PostCSS.

Install

With npm do:

npm install postcss-minify-gradients

Example

Where possible, this module will minify gradient parameters. It can convert linear gradient directional syntax to angles, remove the unnecessary 0% and 100% start and end values, and minimise color stops that use the same length values (the browser will adjust the value automatically).

Input

h1 {
    background: linear-gradient(to bottom, #ffe500 0%, #ffe500 50%, #121 50%, #121 100%)
}

Output

h1 {
    background: linear-gradient(180deg, #ffe500, #ffe500 50%, #121 0, #121)
}

Usage

See the PostCSS documentation for examples for your environment.

Contributors

See CONTRIBUTORS.md.

License

MIT © Ben Briggs

Current Tags

  • 6.0.0                                ...           latest (2 years ago)

11 Versions

  • 6.0.0                                ...           2 years ago
  • 5.1.1                                ...           3 years ago
  • 5.0.5                                ...           4 years ago
  • 5.0.4                                ...           4 years ago
  • 5.0.2                                ...           4 years ago
  • 5.0.1                                ...           4 years ago
  • 4.0.0-nightly.2020.2.6                                ...           5 years ago
  • 5.0.0-rc.2                                ...           4 years ago
  • 5.0.0                                ...           4 years ago
  • 1.0.5                                ...           9 years ago
  • 4.0.2                                ...           7 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org