postcss-pxtorem icon indicating copy to clipboard operation
postcss-pxtorem copied to clipboard

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

Open edc-hui opened this issue 2 years ago • 6 comments

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 avatar Nov 17 '21 10:11 edc-hui

@cuth

edc-hui avatar Nov 17 '21 10:11 edc-hui

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

cuiyajie avatar Apr 11 '22 07:04 cuiyajie

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

hemengke1997 avatar Aug 20 '22 09:08 hemengke1997

Same here.

yoyo837 avatar Oct 03 '22 11:10 yoyo837

Same problem

js2me avatar Jan 16 '23 17:01 js2me

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

yoyo837 avatar Feb 19 '24 03:02 yoyo837