about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJeong Arm <kjwonmail@gmail.com>2021-10-15 04:04:26 +0900
committerGitHub <noreply@github.com>2021-10-14 21:04:26 +0200
commit3ec8e04b3b838428cb289f6cc39fa9b4e2cf94b5 (patch)
tree035026c0ae6c092fb80e816abccdb15153e325c3
parent8ce42640e5131ec4202f6f7dd2557f8e2eba4fc1 (diff)
Add font-display to display text before loading (#16330)
-rw-r--r--app/javascript/styles/fonts/montserrat.scss2
-rw-r--r--app/javascript/styles/fonts/roboto-mono.scss1
-rw-r--r--app/javascript/styles/fonts/roboto.scss4
3 files changed, 7 insertions, 0 deletions
diff --git a/app/javascript/styles/fonts/montserrat.scss b/app/javascript/styles/fonts/montserrat.scss
index 8079dc6fc..ea7e04536 100644
--- a/app/javascript/styles/fonts/montserrat.scss
+++ b/app/javascript/styles/fonts/montserrat.scss
@@ -5,6 +5,7 @@
     url('../fonts/montserrat/Montserrat-Regular.woff') format('woff'),
     url('../fonts/montserrat/Montserrat-Regular.ttf') format('truetype');
   font-weight: 400;
+  font-display: swap;
   font-style: normal;
 }
 
@@ -13,5 +14,6 @@
   src: local('Montserrat Medium'),
     url('../fonts/montserrat/Montserrat-Medium.ttf') format('truetype');
   font-weight: 500;
+  font-display: swap;
   font-style: normal;
 }
diff --git a/app/javascript/styles/fonts/roboto-mono.scss b/app/javascript/styles/fonts/roboto-mono.scss
index 2a1f74e16..bd9839abf 100644
--- a/app/javascript/styles/fonts/roboto-mono.scss
+++ b/app/javascript/styles/fonts/roboto-mono.scss
@@ -6,5 +6,6 @@
     url('../fonts/roboto-mono/robotomono-regular-webfont.ttf') format('truetype'),
     url('../fonts/roboto-mono/robotomono-regular-webfont.svg#roboto_monoregular') format('svg');
   font-weight: 400;
+  font-display: swap;
   font-style: normal;
 }
diff --git a/app/javascript/styles/fonts/roboto.scss b/app/javascript/styles/fonts/roboto.scss
index f9c7c50fe..f3a6dcb6e 100644
--- a/app/javascript/styles/fonts/roboto.scss
+++ b/app/javascript/styles/fonts/roboto.scss
@@ -6,6 +6,7 @@
     url('../fonts/roboto/roboto-italic-webfont.ttf') format('truetype'),
     url('../fonts/roboto/roboto-italic-webfont.svg#roboto-italic-webfont') format('svg');
   font-weight: normal;
+  font-display: swap;
   font-style: italic;
 }
 
@@ -17,6 +18,7 @@
     url('../fonts/roboto/roboto-bold-webfont.ttf') format('truetype'),
     url('../fonts/roboto/roboto-bold-webfont.svg#roboto-bold-webfont') format('svg');
   font-weight: bold;
+  font-display: swap;
   font-style: normal;
 }
 
@@ -28,6 +30,7 @@
     url('../fonts/roboto/roboto-medium-webfont.ttf') format('truetype'),
     url('../fonts/roboto/roboto-medium-webfont.svg#roboto-medium-webfont') format('svg');
   font-weight: 500;
+  font-display: swap;
   font-style: normal;
 }
 
@@ -39,5 +42,6 @@
     url('../fonts/roboto/roboto-regular-webfont.ttf') format('truetype'),
     url('../fonts/roboto/roboto-regular-webfont.svg#roboto-regular-webfont') format('svg');
   font-weight: normal;
+  font-display: swap;
   font-style: normal;
 }