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

Cannot break font inheritance @import

Solved by sori View solution

Started by Stefan K 8 years ago · 3 replies · 826 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 stuart young, 2 weeks ago
3 251 2 weeks ago
Themes & Styling · by Sebadamus, 3 weeks ago
5 317 3 weeks ago
Themes & Styling · by martynfoster735, 4 weeks ago
1 310 4 weeks ago
Themes & Styling · by Justin Young, 1 month ago
1 348 1 month ago
Themes & Styling · by Slebeig, 2 months ago
4 474 2 months ago