postcss-minify-gradients
Minify gradient parameters with PostCSS.
Last updated 2 years ago by evilebottnawi .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ 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

  • 4.0.2                                ...           latest (2 years ago)
  • 4.0.0-rc.2                                ...           next (3 years ago)
  • 4.0.0-nightly.2020.1.11                                ...           nightly (14 days ago)

27 Versions

  • 4.0.0-nightly.2020.1.11                                ...           14 days ago
  • 4.0.0-nightly.2020.1.9                                ...           16 days ago
  • 4.0.0-nightly.2020.10.20                                ...           3 months ago
  • 4.0.0-nightly.2020.9.9                                ...           5 months ago
  • 4.0.0-nightly.2020.9.3                                ...           5 months ago
  • 4.0.0-nightly.2020.9.1                                ...           5 months ago
  • 4.0.0-nightly.2020.8.29                                ...           5 months ago
  • 4.0.0-nightly.2020.8.25                                ...           5 months ago
  • 4.0.0-nightly.2020.8.24                                ...           5 months ago
  • 4.0.0-nightly.2020.8.17                                ...           5 months ago
  • 4.0.0-nightly.2020.8.10                                ...           5 months ago
  • 4.0.0-nightly.2020.8.4                                ...           6 months ago
  • 4.0.0-nightly.2020.8.1                                ...           6 months ago
  • 4.0.0-nightly.2020.7.31                                ...           6 months ago
  • 4.0.0-nightly.2020.7.25                                ...           6 months ago
  • 4.0.0-nightly.2020.7.24                                ...           6 months ago
  • 4.0.2                                ...           2 years ago
  • 4.0.1                                ...           2 years ago
  • 4.0.0                                ...           3 years ago
  • 4.0.0-rc.2                                ...           3 years ago
  • 4.0.0-rc.0                                ...           4 years ago
  • 1.0.5                                ...           4 years ago
  • 1.0.4                                ...           4 years ago
  • 1.0.3                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago

Copyright 2014 - 2017 © taobao.org |