Closed kasperific closed 4 years ago
CSS-in-JS libraries know that a px unit must be added to a stripped pixel. Therefore, I do not see any problems here. Material-UI example in Codesandbox.
I can add the needToStripPx
setting if you have a case where the library did not add a px unit.
I didn't realize CSS-in-JS libraries did that! Thanks!
I noticed that rem and em don't get stripped, but px does. It would be helpful to keep the px unit. You can see in your demo, that the font-size rule is rendered as
font-size: 11
, which would be ignored by the browser.