You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
1.1 KiB
JavaScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

module.exports = {
"plugins": {
"postcss-px-to-viewport": {
viewportWidth: 1920, // 视窗的宽度对应的是我们设计稿的宽度移动端一般是750如果是pc端那就是类似1920这样的尺寸
viewportHeight: 1080, // 视窗的高度移动端一般指定1334也可以不配置
unitPrecision: 3, // 指定`px`转换为视窗单位值的小数位数(很多时候无法整除)
viewportUnit: 'vw', // 指定需要转换成的视窗单位建议使用vw
selectorBlackList: ['.ignore', '.hairlines'], // 指定不转换为视窗单位的类,可以自定义,可以无限添加,建议定义一至两个通用的类名
minPixelValue: 1, // 小于或等于`1px`不转换为视窗单位,你也可以设置为你想要的值
mediaQuery: false // 允许在媒体查询中转换`px`
},
// "postcss-viewport-units":{
// silence:true
// },
"cssnano": {
preset: "default", // 设置成default将不会启用autoprefixer
"postcss-zindex": false
}
}
}