postcss-remtopx
v1.0.0
Published
PostCSS plugin for converting rem to px.
Downloads
2,610
Readme
postcss-remtopx
PostCSS plugin for converting rem to px.
Getting Started
Install remtopx: npm install --save-dev postcss-remtopx
Include remtopx and execute:
var postcss = require('postcss');
var remtopx = require('postcss-remtopx');
var output = postcss([remtopx]).process('body { padding: 2rem; }');
// body { padding: 32px; }
Options
var output = postcss([remtopx({ rootFontSize: 14 })]).process('body { padding: 2rem; }');
// body { padding: 28px; }
rootFontSize
Type: float
Default: 16
Changes the root font size used to calculate the rem pixel values.
License
postcss-remtopx is released under the ISC license.
Copyright © 2016, Roland Warmerdam.