From 7acb245c76784bfbc8221f92fae07ddfc18683c8 Mon Sep 17 00:00:00 2001 From: Michael Peters Date: Thu, 30 Dec 2021 21:16:32 -0600 Subject: [PATCH] fix font size flickering bug --- src/client/webapp/styles/fonts.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/client/webapp/styles/fonts.scss b/src/client/webapp/styles/fonts.scss index b61a9c1..2dc9bf5 100644 --- a/src/client/webapp/styles/fonts.scss +++ b/src/client/webapp/styles/fonts.scss @@ -1,30 +1,35 @@ @font-face { font-family: Whitney; font-weight: 300; + font-display: block; // Uses an invisible font until it's loaded. See https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display src: url(./font/whitney/whitney-300.woff); } @font-face { font-family: Whitney; font-weight: 400; + font-display: block; src: url(./font/whitney/whitney-400.woff); } @font-face { font-family: Whitney; font-weight: 500; + font-display: block; src: url(./font/whitney/whitney-500.woff); } @font-face { font-family: Whitney; font-weight: 600; + font-display: block; src: url(./font/whitney/whitney-600.woff); } @font-face { font-family: Whitney; font-weight: 700; + font-display: block; src: url(./font/whitney/whitney-700.woff); }