summaryrefslogtreecommitdiff
path: root/app/views/layouts/_loading_hints.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/layouts/_loading_hints.html.haml')
-rw-r--r--app/views/layouts/_loading_hints.html.haml6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/views/layouts/_loading_hints.html.haml b/app/views/layouts/_loading_hints.html.haml
index b3bb474ea43..b1d1447ae2a 100644
--- a/app/views/layouts/_loading_hints.html.haml
+++ b/app/views/layouts/_loading_hints.html.haml
@@ -13,3 +13,9 @@
= preload_link_tag(path_to_stylesheet("highlight/themes/#{user_color_scheme}"), crossorigin: css_crossorigin)
- if Gitlab::Tracking.enabled? && Gitlab::Tracking.collector_hostname
%link{ rel: 'preconnect', href: "https://#{Gitlab::Tracking.collector_hostname}", crossorigin: '' }
+ - if use_new_fonts?
+ -# Do not use preload_link_tag for fonts, to work around Firefox double-fetch bug.
+ -# See https://github.com/web-platform-tests/wpt/pull/36930
+ %link{ rel: 'preload', href: font_path('gitlab-sans/GitLabSans.woff2'), as: 'font', crossorigin: css_crossorigin }
+ %link{ rel: 'preload', href: font_path('jetbrains-mono/JetBrainsMono.woff2'), as: 'font', crossorigin: css_crossorigin }
+ = preload_link_tag(path_to_stylesheet('fonts'), crossorigin: css_crossorigin)