Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 610 Bytes

README.md

File metadata and controls

43 lines (27 loc) · 610 Bytes

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