1.0.1 • Published 6 years ago

postcss-rem2rpx v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

postcss-rem2rpx

PostCSS plugin for converting rem to rpx.

Install

npm i postcss-rem2rpx -D

Usage

// in postcss.config.js
var rem2rpx = require('postcss-rem2rpx');

module.exports = function() {
    return {
        plugins: [
            rem2rpx({ rootFontSize: 100 })
        ]
    }
}

Options

rootFontSize

Type: float Default: 16

The root font size used to calculate the rem pixel values.

precision

Type: int Default: 5

The decimal numbers to allow the REM units to grow to.

License

MIT © Jiayang Shen