Open matvp91 opened 4 years ago
it should probably be REM that we use; looks like this is how facebook does it
source: https://engineering.fb.com/web/facebook-redesign/
specific quote:
By using rems, we can respect user-specified defaults and are able to provide controls for customizing font size without requiring changes to the stylesheet. Designs, however, are usually created using CSS pixel values. Manually converting to rems adds engineering overhead and the potential for bugs, so we have our build tool do this conversion for us.
I'll probably default to rem and have the user define a unit in the babel config if needed.
We should eventually be able to configure the babel plugin with the following setting:
When the compiler parses a fontSize rule, the following transformation should be applied:
If no
baseFontSize
setting is found, no translation should happen.