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
3.07k stars 405 forks source link

可以增加一个最大宽度或者最小宽度吗,当屏幕大于最大或者小于最小以后就不在转换吗 #166

Open BeiJiu123 opened 1 year ago

wswmsword commented 11 months ago

试一下 postcss-mobile-forever

woshiqiji commented 1 month ago

试一下 postcss-mobile-forever

这个可以和 postcss-px-to-viewport 一块用吗?我一起用报这个错: Syntax Error: Error: PostCSS plugin postcss-mobile-forever requires PostCSS 8.

wswmsword commented 1 month ago

@woshiqiji 要先升级一下 PostCSS,报错是说你项目里的 PostCSS 是老版本的,如果没办法升级 PostCSS,就试一下兼容版本的 postcss-mobile-forever 吧:

npm install postcss-mobile-forever@legacy --save-dev