Last change
on this file since 84d0fbb was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[6a3a178] | 1 | # [postcss][postcss]-minify-gradients
|
---|
| 2 |
|
---|
| 3 | > Minify gradient parameters with PostCSS.
|
---|
| 4 |
|
---|
| 5 | ## Install
|
---|
| 6 |
|
---|
| 7 | With [npm](https://npmjs.org/package/postcss-minify-gradients) do:
|
---|
| 8 |
|
---|
| 9 | ```
|
---|
| 10 | npm install postcss-minify-gradients
|
---|
| 11 | ```
|
---|
| 12 |
|
---|
| 13 |
|
---|
| 14 | ## Example
|
---|
| 15 |
|
---|
| 16 | Where possible, this module will minify gradient parameters. It can convert
|
---|
| 17 | linear gradient directional syntax to angles, remove the unnecessary `0%` and
|
---|
| 18 | `100%` start and end values, and minimise color stops that use the same length
|
---|
| 19 | values (the browser will adjust the value automatically).
|
---|
| 20 |
|
---|
| 21 | ### Input
|
---|
| 22 |
|
---|
| 23 | ```css
|
---|
| 24 | h1 {
|
---|
| 25 | background: linear-gradient(to bottom, #ffe500 0%, #ffe500 50%, #121 50%, #121 100%)
|
---|
| 26 | }
|
---|
| 27 | ```
|
---|
| 28 |
|
---|
| 29 | ### Output
|
---|
| 30 |
|
---|
| 31 | ```css
|
---|
| 32 | h1 {
|
---|
| 33 | background: linear-gradient(180deg, #ffe500, #ffe500 50%, #121 0, #121)
|
---|
| 34 | }
|
---|
| 35 | ```
|
---|
| 36 |
|
---|
| 37 |
|
---|
| 38 | ## Usage
|
---|
| 39 |
|
---|
| 40 | See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for
|
---|
| 41 | examples for your environment.
|
---|
| 42 |
|
---|
| 43 |
|
---|
| 44 | ## Contributors
|
---|
| 45 |
|
---|
| 46 | See [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).
|
---|
| 47 |
|
---|
| 48 |
|
---|
| 49 | ## License
|
---|
| 50 |
|
---|
| 51 | MIT © [Ben Briggs](http://beneb.info)
|
---|
| 52 |
|
---|
| 53 | [postcss]: https://github.com/postcss/postcss
|
---|
Note:
See
TracBrowser
for help on using the repository browser.