PostCSS Rpx2rem
PostCSS plugin rpx2rem.
/* target */
/* output */
Usage
const rpx2rem = ;
options
Type: Object | Null
Default:
targetUnit: 'rpx' outputUnit: 'rem' proportion: 10 / 750 // 10rem / 750rpx; proportion = ouput / target unitPrecision: 5 replace: true mediaQuery: false
targetUnit
(String) The target unit you want to replaceoutputUnit
(String) The unit you want to outputproportion
(Number) The proportion you want to convert; proportion = ouput / targetunitPrecision
(Number) The decimal numbers to allow the REM units to grow to.replace
(Boolean) replaces rules containing rems instead of adding fallbacks.mediaQuery
(Boolean) Allow px to be converted in media queries.