Skip to content

wh8766/postcss-px-resize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published