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
rem转换调试困难
目前是使用的根节点的fint-size rem实现的, 但是转换后对于调试很不友好
比如750的设计稿, 使用vw作为根节点的font-size
经过转换 1px = 0.13333vw
那么在写样式的时候 直接写为rem就ok了,调试方面也很友好,
The text was updated successfully, but these errors were encountered:
可以尝试给项目提个 PR ~
Sorry, something went wrong.
我没有太理解所说的。因为目前根 font-size 为 px 时,在写样式时也可以直接使用 rem。
或者这个 issue 想表达的是如何更方便的将设计稿中的 px 显示写为 rem?但显示写为 rem 后目前编译到小程序是不支持的。
我想问题在于,在 h5 中 Taro.pxTransform 方法转换后的值并不对,因为对应的 px 会因屏幕尺寸的变化而变化。为了解决这种变化,我想我们在 h5 中应该采用 viewport 来取代 rem 布局。
Taro.pxTransform
viewport
rem
这里应该是说,希望可以把根节点的字号基准值改为 vw 便于速算值,实际应该和 px 无甚差别。
web 场景中并不完全是移动端,如果需要使用 viewport 可以直接使用,使用它替代 rem 并没有实际意义(rem 实际运算值和小程序有差别也并非是 rem 的问题,而是在 web 环境中为了应对其他场景可以限制了字号基准的最大最小值,这里改动无甚意义)
所以,就没有后文了是么。。现在这个转换真的很迷。
No branches or pull requests
这个特性解决了什么问题?
rem转换调试困难
目前是使用的根节点的fint-size rem实现的, 但是转换后对于调试很不友好
这个 API 长什么样?
比如750的设计稿, 使用vw作为根节点的font-size
经过转换 1px = 0.13333vw
那么在写样式的时候 直接写为rem就ok了,调试方面也很友好,
The text was updated successfully, but these errors were encountered: