Skip to content

colinmeinke/postcss-calc-function

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A PostCSS plugin to resolve the CSS calc function

Resources

License

Stars

Watchers

Forks

Packages

No packages published