aj_rem2px

0.0.4 • Public • Published

###将dist/css中rem转px单位,其他单位暂不支持


在配置文件中使用:

const rem2px = require('aj_rem2px');
...
plugins: [
  new rem2px({
    base: 100,			// 换算比例,默认 100px = 1rem
    px: false,		 	// 开启后反转 px转rem 默认 false
  })
]
...

例:a.css

html{
  font-size: 1rem;
  height:100px;
}

生成:a_px.css

html{
  font-size: 100px;
  height:100px;
}

开启px生成:a_rem.css

html{
  font-size: 1rem;
  height:1rem;
}

Readme

Keywords

none

Package Sidebar

Install

npm i aj_rem2px

Weekly Downloads

1

Version

0.0.4

License

ISC

Unpacked Size

4.02 kB

Total Files

4

Last publish

Collaborators

  • ajianb