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

viewportWidth支持用户传入function,根据不同文件名设置不同的基准尺寸 #138

Open muxw opened 1 year ago

muxw commented 1 year ago

有些ui库的设计尺寸可能不一样,这样可以通过文件名对不同的ui库做自定义设置。

ovo4096 commented 1 year ago

This feature is very important, expect to merge.

wswmsword commented 1 year ago

试试我写的库呗,基本兼容了 px-to-viewport,同时可以限制桌面端的最大宽度,也可以在横屏展示,mobile-to-multi-displays