Open gkatsanos opened 1 year ago
Since tailwind uses REM as a default & it doesn't really impact your tailwind config I'm not really inclined to do so. What would be your arguments for it?
most teams who develop design style guides use their own font size specifications and you can override the default tailwind sizes to anything you want.. not sure why you would add the extra effort to convert them, the style guide designer would be responsible to author in the format they prefer right? would it be an idea to offer a config option that escapes the conversion?
My point was, your design uses pixels in Figma, the plugin sets these to rem
values. These end up in a config which you will use in your code. But what's the difference for you in these scenarios?
Scenario 1: your config has:
base: "1.125rem", // 18px
lg: "1.375rem", // 22px
xl: "1.5rem", // 24px
"2xl": "1.875rem", // 30px
"3xl": "2rem", // 32px
"4xl": "2.5rem", // 40px
"5xl": "3.125rem", // 50px
"6xl": "4.375rem" // 70px
In your code you use this, let's say: text-lg
Scenario 2: your config has:
base: "18px",
lg: "22px",
...
In your code you use this still the same: text-lg
.
Don't really see why you would want to change the way you write the values in your config since it doesn't affect the code you write in any way?
The tailwind config is used by more than one applications - We switched to pixels because some apps had a different font-size base value and we were having inconsistencies...
Hmm, will try to see if I can get this implemented anytime soon.
Can I disable the REM conversion and leave it as-authored?