Skip to content

Commit 4f4bf71

Browse files
committed
[repo] Improve performance of font loading
This is based on advice from Lighthouse reports: https://web.dev/font-display/?utm_source=lighthouse&utm_medium=cli
1 parent 7b2963d commit 4f4bf71

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/css/custom.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ html {
6666
@font-face {
6767
font-family: "Open Sans";
6868
src: url("/static/font/OpenSans-VariableFont_wdth,wght.woff2") format("woff2");
69+
font-display: swap;
6970
}
7071

7172
.navbar__logo {

src/pages/index.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
@font-face {
6262
font-family: "DM Sans Serif";
6363
src: url("/static/font/DMSerifDisplay-Regular.woff2") format("woff2");
64+
font-display: swap;
6465
}
6566

6667
h1 {

0 commit comments

Comments
 (0)