New issue
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
unocss@0.46.5, uniapp_vite_vue3,h5打包后 rpx 未转换成 rem #15
Comments
解决方法: 先使用 npm i unocss@0.46.4
|
.h-200 {
height: 100px;
}
.shadow-md {
--un-shadow: var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));
box-shadow: var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);
} 为什么我uniapp+vue2的h5被转化成px了, 是正常的么 |
这是正常的,这个大小是用 uniapp 内置方法转换的,会根据不同屏幕大小, 改变的 uniapp rpxTranform,在 @dcloudio/vue-cli-plugin-uni/packages/postcss 37行 |
那我实际写的时候怎么样根据他的方法转换呢,taro有个尺寸转换的,uniapp我不是很了解 |
uniapp 和 小程序一样用 750rpx 的,没有提供像 taro 尺寸转换,所以按 750 设计稿来就行,平常怎么写就怎么写 |
如果unocss类名的样式被覆盖了比如px-6 怎么让他加个important 我不想在下面写 |
如果unocss类名的样式被覆盖了比如px-6 怎么让他加个important 我不想在下面写 |
加 .!p-10 {
padding:80rpx !important;
}
.important:p-3 {
padding:24rpx !important;
} |
unocss@0.46.5, build 时 applyCssTransform 被删除了,导致打包后 rpx 未转换成 rem
The text was updated successfully, but these errors were encountered: