Skip to content

Commit

Permalink
chore: 调整视口适配转换为 vmin 单位
Browse files Browse the repository at this point in the history
  • Loading branch information
yulimchen committed May 22, 2024
1 parent 77d65d2 commit bb4ae78
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ export default {
// 使用 cnjm-postcss-px-to-viewport 规避 postcss.plugin was deprecated 警告
"cnjm-postcss-px-to-viewport": {
viewportWidth: 375, // 根据设计稿设定
minPixelValue: 1, // 最小的转换数值
unitPrecision: 2 // 转化精度,转换后保留位数
unitPrecision: 4, // 转化精度,转换后保留位数
viewportUnit: "vmin", // 转换后的单位
fontViewportUnit: "vmin", // 字体单位
unitToConvert: "px" // 需要转换的单位
},
autoprefixer: {
overrideBrowserslist: ["Android >= 4.0", "iOS >= 7"]
Expand Down

0 comments on commit bb4ae78

Please sign in to comment.