wswmsword / postcss-mobile-forever

一款 PostCSS 插件,将固定尺寸的视图转为可跟随宽度变化而等比例伸缩的视图。To adapt different displays by one mobile viewport.
https://wswmsword.github.io/examples/mobile-forever/vanilla/
MIT License
325 stars 19 forks source link

[Feature] The 1px scenario needs to be considered #41

Closed Siykt closed 5 months ago

Siykt commented 5 months ago

I hope to have a configuration option similar to minPixelValue in postcss-px-to-viewport to adapt to more scenarios.

希望留一个配置项类似 postcss-px-to-viewportminPixelValue 以适应更多的场景。

wswmsword commented 5 months ago

Hello, you can try using the valueBlackList option. Values added to this option will not be converted, like this: "valueBlackList": ["1px solid black"].

你好,您可以试试 valueBlackList 这个选项,加到这个选项里的值就不会被转换了,像这样 "valueBlackList": ["1px solid black"]

我觉得没有很多需要小于某个值就不进行转换的场景,所以没有添加 minPixelValue 这个选项,1px 不转换更像是一个特定场景,应该用一个特定属性来解决这个问题,而不是一个范围,参考之前的 Issue #7