From 588f70e8babd19fc07d5b163e14f110623d58934 Mon Sep 17 00:00:00 2001 From: Christian Rebischke Date: Mon, 15 Jul 2019 23:41:46 +0200 Subject: [PATCH] Added font-display: auto to _fonts.scss font-display on `auto` makes sure that the text is always visible for the user. It's a suggestion by Googles PageSpeed Insights to activate this feature: https://developers.google.com/web/updates/2016/02/font-display?utm_source=lighthouse&utm_medium=unknown Signed-off-by: Christian Rebischke --- assets/scss/_fonts.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/assets/scss/_fonts.scss b/assets/scss/_fonts.scss index 25ce9a8..83fb588 100644 --- a/assets/scss/_fonts.scss +++ b/assets/scss/_fonts.scss @@ -1,6 +1,7 @@ @font-face { font-family: 'Inter UI'; font-style: normal; + font-display: auto; font-weight: 400; src: url("../fonts/Inter-UI-Regular.woff2") format("woff2"), url("../fonts/Inter-UI-Regular.woff") format("woff"); @@ -8,6 +9,7 @@ @font-face { font-family: 'Inter UI'; font-style: italic; + font-display: auto; font-weight: 400; src: url("../fonts/Inter-UI-Italic.woff2") format("woff2"), url("../fonts/Inter-UI-Italic.woff") format("woff"); @@ -16,6 +18,7 @@ @font-face { font-family: 'Inter UI'; font-style: normal; + font-display: auto; font-weight: 600; src: url("../fonts/Inter-UI-Medium.woff2") format("woff2"), url("../fonts/Inter-UI-Medium.woff") format("woff"); @@ -23,6 +26,7 @@ @font-face { font-family: 'Inter UI'; font-style: italic; + font-display: auto; font-weight: 600; src: url("../fonts/Inter-UI-MediumItalic.woff2") format("woff2"), url("../fonts/Inter-UI-MediumItalic.woff") format("woff"); @@ -31,6 +35,7 @@ @font-face { font-family: 'Inter UI'; font-style: normal; + font-display: auto; font-weight: 800; src: url("../fonts/Inter-UI-Bold.woff2") format("woff2"), url("../fonts/Inter-UI-Bold.woff") format("woff"); @@ -38,6 +43,7 @@ @font-face { font-family: 'Inter UI'; font-style: italic; + font-display: auto; font-weight: 800; src: url("../fonts/Inter-UI-BoldItalic.woff2") format("woff2"), url("../fonts/Inter-UI-BoldItalic.woff") format("woff");