issues
search
evrone
/
postcss-px-to-viewport
A plugin for PostCSS that generates viewport units (vw, vh, vmin, vmax) from pixel units. The best choice to create a scalable interface on different displays by one design size.
https://evrone.com/postcss-px-viewport
MIT License
2.98k
stars
401
forks
source link
垂直方向的长度值不可以自动转成vh吗?
#164
Open
ys3322
opened
10 months ago
ys3322
commented
10 months ago
这个插件会把所有像素值自动转成vw,而垂直方向不会转成vh,那么怎么能实现等比例缩放呢?
垂直方向的长度值有:height\line-heiht\top\bottom\margin-bottom等,我的操作是手动调用scss函数,计算垂直方向的长度值,变成vh。
我看到文档上的demo也是自己标识的vh单位,这样才够实现等比例缩放。我感觉未免麻烦些了,不知道各位有什么好方案,可以实现垂直方向像素自动vh?