0.0.2 • Published 10 years ago
fis-parser-rem v0.0.2
fis-parser-rem
fis px自动转化成rem插件
fis.conf
CSS
fis.match('*.css', {
parser: [
fis.plugin('rem')
]
})SCSS
fis.match('*.scss', {
rExt: '.css',
parser: [
fis.plugin('node-sass'),
fis.plugin('rem')
]
})Usage
body {
border-top: 1px;
border-bottom: 10px;
padding: 10px; /* @norem */
background-size: 10px 10px; /* @rem */
}输出:
body {
border-top: 1px;
border-bottom: 0.5557rem;
padding: 10px;
background-size: 0.5557rem 0.5557rem;
}Option
- rem
{Number}1rem=多少pxdefault18 - min
{Number}最小转化值default3 - exclude
{Array.<String>}忽略的样式default['width', 'height', 'background', 'background-size']
Question
- 如何忽略整个文件? 在文件头添加
/* @norem */即可