Files
Monkey-Test/WebDriverAgent/Inspector/node_modules/postcss-convert-values
2019-01-25 17:01:52 +08:00
..
fix
2019-01-25 17:01:52 +08:00
fix
2019-01-25 17:01:52 +08:00
fix
2019-01-25 17:01:52 +08:00
fix
2019-01-25 17:01:52 +08:00
fix
2019-01-25 17:01:52 +08:00

postcss-convert-values Build Status NPM version Dependency Status

Convert values with PostCSS (e.g. ms -> s)

Install

With npm do:

npm install postcss-convert-values --save

Example

This plugin reduces CSS size by converting values to use different units where possible; for example, 500ms can be represented as .5s. You can read more about these units in this article.

Input

h1 {
    font-size: 16px;
    width: 0em
}

Output

h1 {
    font-size: 1pc;
    width: 0
}

Note that this plugin only covers conversions for duration and absolute length values. For color conversions, use postcss-colormin.

Contributing

Pull requests are welcome. If you add functionality, then please add unit tests to cover it.

License

MIT © Ben Briggs