postcss-pxtorem-multi-value
v0.0.1
Published
A CSS post-processor that converts px to rem.
Downloads
6
Maintainers
Readme
postcss-pxtorem-multi
A plugin for PostCSS that support multiple rootValue based on pxtorem
Install
$ npm install postcss-pxtorem-multi --save-dev
Usage
- set options which is pxtorem's option array added
type
[{
type: 'phone',
rootValue: 16,
unitPrecision: 5,
selectorBlackList: [],
propList: ["font", "font-size", "line-height", "letter-spacing"],
replace: true,
mediaQuery: false,
minPixelValue: 0,
exclude: null
}, {
type: 'pad',
rootValue: 20,
unitPrecision: 5,
selectorBlackList: [],
propList: ["font", "font-size", "line-height", "letter-spacing"],
replace: true,
mediaQuery: false,
minPixelValue: 0,
exclude: null
}]
- add remark on css file head:
root value ${type}
The plugin will use corresponding option in prev step to generate rem