Skip to content

JiayangShen/postcss-rem2rpx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

PostCSS plugin for converting rem to rpx.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published