mirror of
https://github.com/sunniejs/vue-h5-template.git
synced 2025-10-06 11:29:58 +08:00
17 lines
888 B
JavaScript
17 lines
888 B
JavaScript
// https://github.com/michael-ciniawsky/postcss-load-config
|
||
module.exports = {
|
||
plugins: {
|
||
autoprefixer: {
|
||
overrideBrowserslist: ['Android 4.1', 'iOS 7.1', 'Chrome > 31', 'ff > 31', 'ie >= 8']
|
||
},
|
||
"postcss-px-to-viewport": {
|
||
viewportWidth: 375, // 视窗的宽度,对应的是我们设计稿的宽度,一般是750
|
||
unitPrecision: 3, // 指定`px`转换为视窗单位值的小数位数(很多时候无法整除)
|
||
viewportUnit: 'vw', // 指定需要转换成的视窗单位,建议使用vw
|
||
selectorBlackList: ['.ignore', '.hairlines'], // 指定不转换为视窗单位的类,可以自定义,可以无限添加,建议定义一至两个通用的类名
|
||
minPixelValue: 1, // 小于或等于`1px`不转换为视窗单位,你也可以设置为你想要的值
|
||
mediaQuery: false // 允许在媒体查询中转换`px`
|
||
}
|
||
}
|
||
}
|