fix(Client): Use font-display: fallback to avoid FOIT (#39628)

This commit is contained in:
Twaha Rahman
2020-09-21 19:06:44 +06:00
committed by GitHub
parent 66630715ee
commit 984f311061
3 changed files with 12 additions and 0 deletions

View File

@@ -3,6 +3,7 @@
src: url('../../../static/fonts/lato/Lato-Light.woff') format('woff');
font-weight: 300;
font-style: normal;
font-display: fallback;
}
@font-face {
@@ -10,6 +11,7 @@
src: url('../../../static/fonts/lato/Lato-Regular.woff') format('woff');
font-weight: normal;
font-style: normal;
font-display: fallback;
}
@font-face {
@@ -17,6 +19,7 @@
src: url('../../../static/fonts/lato/Lato-Italic.woff') format('woff');
font-weight: normal;
font-style: italic;
font-display: fallback;
}
@font-face {
@@ -24,6 +27,7 @@
src: url('../../../static/fonts/lato/Lato-Bold.woff') format('woff');
font-weight: bold;
font-style: normal;
font-display: fallback;
}
@font-face {
@@ -31,6 +35,7 @@
src: url('../../../static/fonts/lato/Lato-Black.woff') format('woff');
font-weight: 900;
font-style: normal;
font-display: fallback;
}
/* roboto mono */
@@ -41,6 +46,7 @@
format('woff');
font-weight: normal;
font-style: normal;
font-display: fallback;
}
@font-face {
@@ -49,6 +55,7 @@
format('woff');
font-weight: normal;
font-style: italic;
font-display: fallback;
}
@font-face {
@@ -57,4 +64,5 @@
format('woff');
font-weight: bold;
font-style: normal;
font-display: fallback;
}

View File

@@ -1,6 +1,7 @@
@font-face {
font-family: 'Sax Mono';
src: url('/fonts/saxmono.ttf') format('truetype');
font-display: fallback;
}
.certification-namespace * {

View File

@@ -1,16 +1,19 @@
@font-face {
font-family: 'Lato';
src: url(./fonts/Lato-Regular.ttf) format('truetype');
font-display: fallback;
}
@font-face {
font-family: 'Lato Light';
src: url(./fonts/Lato-Light.ttf) format('truetype');
font-display: fallback;
}
@font-face {
font-family: 'Lato Bold';
src: url(./fonts/Lato-Bold.ttf) format('truetype');
font-display: fallback;
}
* {