0.0.2 • Published 6 years ago

postcss-px-resize v0.0.2

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

postcss-px-resize

Build Status

A postcss plugin to resize px in src.

Project reference:https://github.com/songsiqi/px2rem-postcss

Use

npm install postcss-px-resize --save-dev

In Webpack 3, add .postcssrc.js PostCSS config file:

module.exports = () => ({
    plugins: {
        "autoprefixer":{
            // remove: false
            browsers: ['iOS >= 7', 'Android >= 4.1']
        },
        "postcss-px-resize": {
            scale: 0.5
        }
    }
})

Options

  • scale: target scale value, default is 0.5, eg: 50px in scss file will resize to 25px.