1.0.1 • Published 3 years ago

@taikonauten/postcss-function-rem v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Installation

npm install --save-dev @taikonauten/postcss-function-rem

Create a postcss.config.js file in your project root:

const postCSSFunctions = {
  functions: {
    rem: require('@taikonauten/postcss-function-rem'),
  }
};

module.exports = {
  plugins: [
    require('postcss-functions')(postCSSFunctions),
  ]
};

Usage

body {

  padding: rem(20 20);
}

Use default base font size of 16. result: padding: 1.25rem 1.25rem

body {

  padding: rem(20 20, 24);
}

Overwrite default base font size with 24. result: padding: 0.8333333333333334rem 0.8333333333333334rem


Made with ♡ at Taikonauten