where can i find the base font size for the dawn theme

Solved

where can i find the base font size for the dawn theme

Driver3
Shopify Partner
20 0 0

I don't want to change it, I want to find the code that sets it. I can't find it anywhere.

I believe it is this:

 
html {
box-sizing: border-box;
font-size: calc(var(--font-body-scale)* 62.5%);
height: 100%;
}
but that needs to be based on some number like 1 or a pixel value if I'm correct. That is what I'm looking for. 

I've looked in the theme settings. I see the body font size goes up to 130% which i think changes the base font to 13px. The default seems to be 100% which gives a base font of 10px. Is this correct? 

I'm really hoping this is not true as I've been setting most of my css with rem units assuming the that base font size is 16px as most sites are. 

I'm concerned that this will screw up all my customizations if i manually go back and set the base font to 16 px via css. I really hope it is already at 16px as the default font size. Yes, I can see it in dev tools but I want confirmation from someone who knows for sure how shopify handles the base font size as I really don't want to go back and change all my css. 

Thanks

Accepted Solution (1)

polishedCode
Shopify Partner
22 6 8

This is an accepted solution.

This is under the config/settings_data.json file in the code editor. Heading scale should be on line 14 and body scale should be on line 16.

Screenshot 2024-09-28 at 4.33.11 PM.png

 

Hope this helps! 

If this fixed your issue please Like and Accept as a Solution!
For custom Shopify solutions contact us Polished Code
Leave A Coffee Tip ❤️

View solution in original post

Replies 4 (4)

polishedCode
Shopify Partner
22 6 8

This is an accepted solution.

This is under the config/settings_data.json file in the code editor. Heading scale should be on line 14 and body scale should be on line 16.

Screenshot 2024-09-28 at 4.33.11 PM.png

 

Hope this helps! 

If this fixed your issue please Like and Accept as a Solution!
For custom Shopify solutions contact us Polished Code
Leave A Coffee Tip ❤️
Driver3
Shopify Partner
20 0 0

Thanks, so if I leave it at 100% then my base font size converts to 10px? Is that true? 

Driver3
Shopify Partner
20 0 0

I guess what I really want to know is 100% of what? As 100% is a relative size and not an absolute size like a pixel value. 

Driver3
Shopify Partner
20 0 0

O' it is set as 10 that way it is easier to calculate rem or em units. Duh... Ok all good. 😀