Semantic-UI-Meteor
Semantic-UI-Meteor copied to clipboard
Google fonts is blocking page loading when offline.
I'm developing an app in Meteor for mobile iOS and Android. I work mostly in the subway where no internet connection is enabled. I have an extremely annoying issue when it takes the page 30 seconds to load only because it tries to load Google Fonts from the web.
There is also an issue with live stylesheet rendering, when I change my CSS, Meteor automatically tries to reload CSS on the fly. Then page just breaks with no CSS for 30 seconds until the Google Fonts will return "Failed" request.
I do understand that I can switch off Google Fonts and use local instead, but should it be blocking the whole page at all?
#1521 has an answer Fonts will default to Helvetica Neue or Arial which are readily available if Lato is not., but it's not working, because it blocks the whole page rendering for 30 seconds.
Can we just load the page with default fonts in case Google/Internet Connection is not available?
same here. it's a very serious problem. In China google api is not available. As a result, semantic ui pages don't load for 30 seconds or longer at all.
Did you try changing @importGoogleFonts variable to false in
{Semantic UI Folder}/site/globals/site.variables.import.less?
You'll notice that whether Google Fonts loads is controlled in {Semantic UI Folder}/theme.import.less:
54: .loadFonts() when (@importGoogleFonts) {
55: @import url('@{googleProtocol}fonts.googleapis.com/css?family=@{googleFontRequest}');
56: }
Which Atmosphere package are you using for Meteor, semantic:ui or semantic:ui-css?