1.1.0 • Published 9 years ago

postcss-calc-function v1.1.0

Weekly downloads
928
License
ISC
Repository
github
Last release
9 years ago

PostCSS calc function

A PostCSS plugin to resolve the CSS calc function.

Installation

npm install postcss-calc-function

Usage

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;
}