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
希望在使用 unocss 时产出的 css 也经过 postcss 处理
需求背景 目前项目中使用了 unocss,并且使用 rpx 作为单位,但是真机上设计认为尺寸过大,需要整体改为px作为基础单位,我便写了一个postcss-plugin将之前项目中用到的rpx统一转化成px,但是unocss样式无法转化,希望可以支持。
The text was updated successfully, but these errors were encountered:
分享个我自己写 unocss 的方式,希望能帮到你,修改uno.config.js文件,改
presets: [ presetMpx({ baseFontSize: 8 }), presetIcons() ],
基础字体大小设置为 8rpx,然后写样式,直接写 w-344 h-80就是 344 像素和 80 像素了,按照你的需求,你把baseFontSize改成 750 就行了。
<view class="w-344 h-80 rd-12 border-1 border-solid border-black/10 shadow flex items-center py-16 pl-20 pr-16" > <slot></slot> <view class="i-ri-arrow-right-s-line text-24 text-black/45 ml-auto"></view> </view>
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
希望在使用 unocss 时产出的 css 也经过 postcss 处理
需求背景
目前项目中使用了 unocss,并且使用 rpx 作为单位,但是真机上设计认为尺寸过大,需要整体改为px作为基础单位,我便写了一个postcss-plugin将之前项目中用到的rpx统一转化成px,但是unocss样式无法转化,希望可以支持。
The text was updated successfully, but these errors were encountered: