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.04k stars 406 forks source link

why i add selectorBlackList class no working? #29

Closed tinn2015 closed 4 years ago

tinn2015 commented 5 years ago

"postcss-px-to-viewport": { viewportWidth: 750, // 视窗的宽度,对应的是我们设计稿的宽度,一般是750 viewportHeight: 1334, // 视窗的高度,根据750设备的宽度来指定,一般指定1334,也可以不配置 unitPrecision: 3, // 指定px转换为视窗单位值的小数位数(很多时候无法整除) viewportUnit: 'vw', // 指定需要转换成的视窗单位,建议使用vw selectorBlackList: ['.ignore', '.hairlines'], // 指定不转换为视窗单位的类,可以自定义,可以无限添加,建议定义一至两个通用的类名 minPixelValue: 1, // 小于或等于1px不转换为视窗单位,你也可以设置为你想要的值 mediaQuery: false // 允许在媒体查询中转换px },

KODerFunk commented 5 years ago

@tinn2015 please, show your css-code with this selectors and output.

KODerFunk commented 4 years ago

@tinn2015, Most likely, your problem is solved in #8 and #15.