Closed mattmccarley closed 7 years ago
I added a test for the case-sensitivity of px
and included calc()
in #35. I didn't seem to have the same issue that you are having.
Do you have a pre-processor running on your CSS before it gets to postcss? Maybe something is converting the PX
to px
.
After some further testing, it appears that the following example causes the issue:
margin: 12px calc(12PX + 2PX)
In this example the 2 upper case pixel values get converted to rems.
@mdmccarley89 Nevermind, you are correct. I think I know the issue too. I'll put out a fix soon.
@mdmccarley89 published postcss-pxtorem@4.0.1
Thanks so much Jonathan!
I need a pixel value to remain a pixel value inside of a calc function. I have made sure that the value is -17.4359PX before the postcss-pxtorem processes. After processing, this is converted to -1.08974rem.
Is there a specific reason by the plugin ignores PX/Px inside of a calc()?
Is there a workaround?