Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Themes & Styling

Cannot break font inheritance @import

Solved by sori View solution

Started by Stefan K 8 years ago · 3 replies · 683 views
8 years ago

Hi all,
I have created a theme based on Deliver. To help with data protection I now want grav to not load web fonts from Google. To achieve this I have added a
-@import url(<relevant urls>);
to my custom.css in my custum theme folder. Then cleared the cache of grav and Firefox etc. The font is not being used on-screen anymore however Firefox's element inspector still shows Google servers are being contacted and a download is taking place.
Any ideas on what I may have missed or where I need to look?
If you need me to be more specific on this or different aspect please let me know!
Thanks! Stefan

last edited 06/02/18 by Stefan K
8 years ago

Hi sori,

thanks for looking into this.

I have adjusted the Google fonts option in the admin panel not to no avail.

Going through the source code - as suggested by you - I recalled https://getgrav.org/blog/theme-development-with-inheritance. I copied the offending /user/themes/deliver/css-compiled/template.css to /user/themes/<myThemeName>/css-compiled/template.css and took out the offending @import line. Job done, network anaylsis in Firefox now clear, now more loading data from google.

Thanks for jogging my mind by suggesting going back to the html source!

Stefan

8 years ago

Hello stefan,
no problem, I'm glad I could help. Please mark your question as solved/my answer as the "solution". Thank you!

(PS: maybe you can help me with my problem? You can find it under my profile.)

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by Pedro M, 2 months ago
4 195 2 months ago
Themes & Styling · by Ian, 2 months ago
3 91 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 451 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 45 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 125 3 months ago