cuth / postcss-pxtorem

Convert pixel units to rem (root em) units using PostCSS
MIT License
2.02k stars 174 forks source link

When converting negative numbers, the number 0 needs to take units #81

Open edc-hui opened 2 years ago

edc-hui commented 2 years ago

image When the value of left is negative, the conversion result is as shown in the figure, and the number 0 should take the unit.

Process on the return value of the createpxreplace method

edc-hui commented 2 years ago

@cuth

cuiyajie commented 2 years ago

Same error. After converting, 0px will transform to 0, that will cause error when using it in calc function.

hemengke1997 commented 1 year ago

try https://github.com/hemengke1997/postcss-pxtorem 😼

yoyo837 commented 1 year ago

Same here.

js2me commented 1 year ago

Same problem

yoyo837 commented 4 months ago

Fixed in https://github.com/cuth/postcss-pxtorem/pull/106