We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
代码示例: https://codesandbox.io/p/sandbox/condescending-wind-fdmttz?file=%2Fvite.config.ts%3A14%2C12
375 是常见设计稿宽度,目前使用插件配置宽度 375 时仍需显式配置 deviceRatio,否则样式转换后为 NaNpx、NaNrpx 等,导致样式错误。
deviceRatio
NaNpx
NaNrpx
期望在使用 375 设计稿做插件的最小配置时无需配置 deviceRatio
import { defineConfig } from "vite"; import pxtransfrom from "postcss-pxtransform"; // https://vitejs.dev/config/ export default defineConfig({ css: { postcss: { plugins: [ pxtransfrom({ platform: "h5", designWidth: 375, // 设计稿宽度375 }), ], }, }, });
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
这个特性解决了什么问题?
代码示例:
https://codesandbox.io/p/sandbox/condescending-wind-fdmttz?file=%2Fvite.config.ts%3A14%2C12
375 是常见设计稿宽度,目前使用插件配置宽度 375 时仍需显式配置
deviceRatio
,否则样式转换后为NaNpx
、NaNrpx
等,导致样式错误。期望在使用 375 设计稿做插件的最小配置时无需配置
deviceRatio
这个 API 长什么样?
The text was updated successfully, but these errors were encountered: