postcss-calc-function
v1.1.0
Published
A PostCSS plugin to resolve the CSS calc function
Maintainers
Readme
PostCSS calc function
A PostCSS plugin to resolve the CSS calc function.
Installation
npm install postcss-calc-functionUsage
Webpack
...
import calcFunction from 'postcss-calc-function';
export default {
...
postcss: [
calcFunction(),
],
};Input
h1 {
line-height: calc( 2 * 0.75 );
padding: calc( 20px * 1.5 ) calc( 20px + 10px );
}Output
h1 {
line-height: 1.5;
padding: 30px 30px;
}