Skip to content

Commit 7aedd06

Browse files
committed
add font-display: swap for better LCP
1 parent 1137ce7 commit 7aedd06

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

client/src/fonts.scss

+9-1
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,31 @@ $unicode-cyrillic: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
88
font-weight: 400;
99
src: url(/src/assets/fonts/roboto-italic.woff2) format('woff2');
1010
unicode-range: $unicode-latin;
11+
font-display: swap;
1112
}
1213
@font-face {
1314
font-family: 'Roboto';
1415
font-style: normal;
1516
font-weight: 400;
1617
src: url(/src/assets/fonts/roboto-regular.woff2) format('woff2');
1718
unicode-range: $unicode-latin;
19+
font-display: swap;
1820
}
1921
@font-face {
2022
font-family: 'Roboto';
2123
font-style: normal;
2224
font-weight: 500;
2325
src: url(/src/assets/fonts/roboto-medium-regular.woff2) format('woff2');
2426
unicode-range: $unicode-latin;
27+
font-display: swap;
2528
}
2629
@font-face {
2730
font-family: 'Roboto';
2831
font-style: normal;
2932
font-weight: 700;
3033
src: url(/src/assets/fonts/roboto-bold.woff2) format('woff2');
3134
unicode-range: $unicode-latin;
35+
font-display: swap;
3236
}
3337

3438
/* Roboto Font - Cyrillic alphabet */
@@ -38,25 +42,29 @@ $unicode-cyrillic: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
3842
font-weight: 400;
3943
src: url(/src/assets/fonts/roboto-italic-cyrillic.woff2) format('woff2');
4044
unicode-range: $unicode-cyrillic;
45+
font-display: swap;
4146
}
4247
@font-face {
4348
font-family: 'Roboto';
4449
font-style: normal;
4550
font-weight: 400;
4651
src: url(/src/assets/fonts/roboto-regular-cyrillic.woff2) format('woff2');
4752
unicode-range: $unicode-cyrillic;
53+
font-display: swap;
4854
}
4955
@font-face {
5056
font-family: 'Roboto';
5157
font-style: normal;
5258
font-weight: 500;
5359
src: url(/src/assets/fonts/roboto-medium-regular-cyrillic.woff2) format('woff2');
5460
unicode-range: $unicode-cyrillic;
61+
font-display: swap;
5562
}
5663
@font-face {
5764
font-family: 'Roboto';
5865
font-style: normal;
5966
font-weight: 700;
6067
src: url(/src/assets/fonts/roboto-bold-cyrillic.woff2) format('woff2');
6168
unicode-range: $unicode-cyrillic;
62-
}
69+
font-display: swap;
70+
}

0 commit comments

Comments
 (0)