Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Cannot break font inheritance @import

Solved by sori View solution

Started by Stefan K 8 years ago · 3 replies · 906 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 FrViPofm, 4 weeks ago
4 474 2 weeks ago
Themes & Styling · by johan thomas, 5 years ago
1 800 3 weeks ago
Themes & Styling · by stuart young, 2 months ago
3 660 2 months ago
Themes & Styling · by Sebadamus, 3 months ago
5 680 2 months ago
Themes & Styling · by martynfoster735, 3 months ago
1 642 3 months ago