Closed sherakama closed 2 years ago
Is that a new record? 😄
I'll look at this tomorrow after finish another one of my My Account tickets 😄
Lol,
"Took a little off the top"
No rush on this. Feel free to throw whatever changes to the tailwind config you want into the mix.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
@sherakama I'm thinking that there are perhaps 2 ways we could deal with root font sizes
rem
values, so we can create 2 sets of those to use with the 2 presets.In Decanter, we use this variable in for HTML font size in the TW base
file
html: {
fontSize: 'calc(var(--root-font-size-factor) * 100%)',
},
In all our TW theme and plugin files, use calculations for font sizes and spacings that uses rem
, eg:
su-text-20
equals to calc(20rem / (var(--root-font-size-factor) * 16))
Finally, in each project that uses Decanter, we set the root font size for the project using the CSS variable, so eg, with our current setting, we would do this
:root {
--root-font-size-factor: 0.625;
}
@tailwind base;
@tailwind components;
@tailwind utilities;
For projects that want to use a 16 px root font size, we can do so by using a --root-font-size-factor: 1
, and everything else will be the same because it's calculated based on this variable (I tested this and it seems to work). Also, this way we don't have to go back and refactor the other projects. Our UComm friend might also prefer to have 10px as the root font size since they originally came up with this idea and this allows different teams to pick their root font sizes.
@yvonnetangsu,
There are a couple of things that would benefit from the new preset approach that I would like to get an RC out for so please have a review of this and we can open up a new PR for the font size stuff.
@yvonnetangsu,
There are a couple of things that would benefit from the new preset approach that I would like to get an RC out for so please have a review of this and we can open up a new PR for the font size stuff.
Yeah that sounds like a good plan. I'll look at this today 👍🏼
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
READY FOR REVIEW
Summary
Needed By (Date)
Urgency
Steps to Test
Affected Projects or Products
rc
build as it is changing a fair bit