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.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025