fis px自动转化成rem插件
fis.match('*.css', {
parser: [
fis.plugin('rem')
]
})
fis.match('*.scss', {
rExt: '.css',
parser: [
fis.plugin('node-sass'),
fis.plugin('rem')
]
})
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;
}
{Number}
1rem=多少px default
18{Number}
最小转化值 default
3{Array.<String>}
忽略的样式 default
['width', 'height', 'background', 'background-size']
/* @norem */
即可