Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
// 参考:https://github.com/cuth/postcss-pxtorem
module.exports = {
plugins: {
'postcss-pxtorem': {
// rootValue: 75, // 设计稿的十分之一
rootValue({ file }) {
return file.indexOf('vant') !== -1 ? 37.5 : 75
},
unitPrecision: 7, // 保留7位小数位
minPixelValue: 0, // 设置要转换的最小像素值
propList: ['*'], // 可以从px更改为rem的属性
selectorBlackList: ['html', '#app', '.ignore-rem-'], // 不会被转换的选择器
mediaQuery: false // 不允许在媒体查询中转换px
}
}
}