From bb4ae785e4857af6e164637b5b2fd44f9339efe7 Mon Sep 17 00:00:00 2001 From: yulimchen Date: Wed, 22 May 2024 22:41:34 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E8=B0=83=E6=95=B4=E8=A7=86=E5=8F=A3?= =?UTF-8?q?=E9=80=82=E9=85=8D=E8=BD=AC=E6=8D=A2=E4=B8=BA=20vmin=20?= =?UTF-8?q?=E5=8D=95=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- postcss.config.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/postcss.config.js b/postcss.config.js index 8c96bb1..ffb94c4 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -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"]