Shopify themes, liquid, logos, and UX
Congratulations. I customized my own font in the theme using(by uploading a font file to the site):
@font-face {
font-family: "GilroySB";
src: url("https://cdn.shopify.com/s/files/1/0581/9469/0179/files/GilroySB.woff2?v=1708110873") format("woff2"),
url("https://cdn.shopify.com/s/files/1/0581/9469/0179/files/GilroySB.woff?v=1708130944") format("woff");
}body {
font-family: "GilroySB";
}
Where GilroySB is the name of the font. But not all elements on the site follow it (as in the images). I tried to customize each element separately, but it doesn't work. Can you tell me how to solve the problem? Elements are displayed in the base font - Assistant
Solved! Go to the solution
This is an accepted solution.
I solved the problem by changing the font-family: "GilroySB" in the h5 element in the base.css file; instead of the standard line.
When you assign font-family on the body element it will be inherited by all its children unless there is another rule which specifically applies to these elements.
It's hard to be precise without seeing your site, but you should try higher specificity selectors, like
body * {
font-family: "GilroySB";
}
or even
body * {
font-family: "GilroySB" !important;
}
which should cover most of cases.
Note that some apps may still add elements which would not follow the rule.
This is an accepted solution.
I solved the problem by changing the font-family: "GilroySB" in the h5 element in the base.css file; instead of the standard line.
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025