ant-design / cssinjs

https://ant-design.github.io/cssinjs
MIT License
236 stars 59 forks source link

可以增加几个额外的配置项吗,比如有的属性我不想转换,有的类我不想转换,小于多少px就不转换了 #118

Open changguilei opened 1 year ago

changguilei commented 1 year ago

最好能完全覆盖postcss-pxtorem原有的配置项,因为我想让整个项目的风格统一

{ rootValue: 16, unitPrecision: 5, propList: ['font', 'font-size', 'line-height', 'letter-spacing'], selectorBlackList: [], replace: true, mediaQuery: false, minPixelValue: 0, exclude: /node_modules/i }

Wxh16144 commented 11 months ago

pr2rem 当初是我借鉴的 postcss-pxtorem 的, 最初是都支持的, 但是考虑暴露出去可能不方便后续维护, 按需加入. 如果目前需求盲注不了可以暂时自己写一个 transformer 满足业务. 呼声高的 api 可能会考虑加入到 cssinjs px2rem options 中