Skip to content

Commit 16d6110

Browse files
Merge pull request #2803 from jcabak/v2
Performance improvement
2 parents b0e88bb + fb41525 commit 16d6110

File tree

1 file changed

+48
-0
lines changed
  • packages/typescriptlang-org/src/components/layout

1 file changed

+48
-0
lines changed

packages/typescriptlang-org/src/components/layout/fonts.scss

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
src: url("/fonts/CascadiaMono-SemiLight.woff2") format("woff2");
77
font-weight: normal;
88
font-style: normal;
9+
font-display: swap;
910
}
1011

1112
// Custom options
@@ -15,48 +16,55 @@
1516
src: url("/fonts/CascadiaCode-SemiLight.woff2") format("woff2");
1617
font-weight: normal;
1718
font-style: normal;
19+
font-display: swap;
1820
}
1921

2022
@font-face {
2123
font-family: "JetBrains Mono-Regular";
2224
src: url("/fonts/JetBrainsMono-Regular.woff2") format("woff2");
2325
font-weight: normal;
2426
font-style: normal;
27+
font-display: swap;
2528
}
2629

2730
@font-face {
2831
font-family: "FiraCode-Regular";
2932
src: url("/fonts/FiraCode-Regular.woff2") format("woff2");
3033
font-weight: normal;
3134
font-style: normal;
35+
font-display: swap;
3236
}
3337

3438
@font-face {
3539
font-family: "Dank Mono Regular";
3640
src: url("/fonts/DankMono-Regular.woff2") format("woff2");
3741
font-weight: normal;
3842
font-style: normal;
43+
font-display: swap;
3944
}
4045

4146
@font-face {
4247
font-family: "SourceCode Pro Regular";
4348
src: url("/fonts/SourceCodePro-Regular.woff2") format("woff2");
4449
font-weight: normal;
4550
font-style: normal;
51+
font-display: swap;
4652
}
4753

4854
@font-face {
4955
font-family: "OpenDyslexicMono Regular";
5056
src: url("/fonts/OpenDyslexicMono-Regular.woff") format("woff");
5157
font-weight: normal;
5258
font-style: normal;
59+
font-display: swap;
5360
}
5461

5562
@font-face {
5663
font-family: "OpenDyslexic Regular";
5764
src: url("/fonts/OpenDyslexic-Regular.woff") format("woff");
5865
font-weight: normal;
5966
font-style: normal;
67+
font-display: swap;
6068
}
6169

6270
// Fluent App Fonts, taken from the source code from the fluent gatsby template
@@ -69,6 +77,7 @@
6977
format("woff");
7078
font-weight: 100;
7179
font-style: normal;
80+
font-display: swap;
7281
}
7382

7483
@font-face {
@@ -79,6 +88,7 @@
7988
format("woff");
8089
font-weight: 300;
8190
font-style: normal;
91+
font-display: swap;
8292
}
8393

8494
@font-face {
@@ -89,6 +99,7 @@
8999
format("woff");
90100
font-weight: 400;
91101
font-style: normal;
102+
font-display: swap;
92103
}
93104

94105
@font-face {
@@ -99,6 +110,7 @@
99110
format("woff");
100111
font-weight: 600;
101112
font-style: normal;
113+
font-display: swap;
102114
}
103115

104116
@font-face {
@@ -109,6 +121,7 @@
109121
format("woff");
110122
font-weight: 700;
111123
font-style: normal;
124+
font-display: swap;
112125
}
113126

114127
@font-face {
@@ -119,6 +132,7 @@
119132
format("woff");
120133
font-weight: 100;
121134
font-style: normal;
135+
font-display: swap;
122136
}
123137

124138
@font-face {
@@ -129,6 +143,7 @@
129143
format("woff");
130144
font-weight: 300;
131145
font-style: normal;
146+
font-display: swap;
132147
}
133148

134149
@font-face {
@@ -139,6 +154,7 @@
139154
format("woff");
140155
font-weight: 400;
141156
font-style: normal;
157+
font-display: swap;
142158
}
143159

144160
@font-face {
@@ -149,6 +165,7 @@
149165
format("woff");
150166
font-weight: 600;
151167
font-style: normal;
168+
font-display: swap;
152169
}
153170

154171
@font-face {
@@ -159,6 +176,7 @@
159176
format("woff");
160177
font-weight: 700;
161178
font-style: normal;
179+
font-display: swap;
162180
}
163181

164182
@font-face {
@@ -169,6 +187,7 @@
169187
format("woff");
170188
font-weight: 100;
171189
font-style: normal;
190+
font-display: swap;
172191
}
173192

174193
@font-face {
@@ -179,6 +198,7 @@
179198
format("woff");
180199
font-weight: 300;
181200
font-style: normal;
201+
font-display: swap;
182202
}
183203

184204
@font-face {
@@ -189,6 +209,7 @@
189209
format("woff");
190210
font-weight: 400;
191211
font-style: normal;
212+
font-display: swap;
192213
}
193214

194215
@font-face {
@@ -199,6 +220,7 @@
199220
format("woff");
200221
font-weight: 600;
201222
font-style: normal;
223+
font-display: swap;
202224
}
203225

204226
@font-face {
@@ -209,6 +231,7 @@
209231
format("woff");
210232
font-weight: 700;
211233
font-style: normal;
234+
font-display: swap;
212235
}
213236

214237
@font-face {
@@ -219,6 +242,7 @@
219242
format("woff");
220243
font-weight: 100;
221244
font-style: normal;
245+
font-display: swap;
222246
}
223247

224248
@font-face {
@@ -229,6 +253,7 @@
229253
format("woff");
230254
font-weight: 300;
231255
font-style: normal;
256+
font-display: swap;
232257
}
233258

234259
@font-face {
@@ -239,6 +264,7 @@
239264
format("woff");
240265
font-weight: 400;
241266
font-style: normal;
267+
font-display: swap;
242268
}
243269

244270
@font-face {
@@ -249,6 +275,7 @@
249275
format("woff");
250276
font-weight: 600;
251277
font-style: normal;
278+
font-display: swap;
252279
}
253280

254281
@font-face {
@@ -259,6 +286,7 @@
259286
format("woff");
260287
font-weight: 700;
261288
font-style: normal;
289+
font-display: swap;
262290
}
263291

264292
@font-face {
@@ -269,6 +297,7 @@
269297
format("woff");
270298
font-weight: 100;
271299
font-style: normal;
300+
font-display: swap;
272301
}
273302

274303
@font-face {
@@ -279,6 +308,7 @@
279308
format("woff");
280309
font-weight: 300;
281310
font-style: normal;
311+
font-display: swap;
282312
}
283313

284314
@font-face {
@@ -289,6 +319,7 @@
289319
format("woff");
290320
font-weight: 400;
291321
font-style: normal;
322+
font-display: swap;
292323
}
293324

294325
@font-face {
@@ -299,6 +330,7 @@
299330
format("woff");
300331
font-weight: 600;
301332
font-style: normal;
333+
font-display: swap;
302334
}
303335

304336
@font-face {
@@ -309,6 +341,7 @@
309341
format("woff");
310342
font-weight: 700;
311343
font-style: normal;
344+
font-display: swap;
312345
}
313346

314347
@font-face {
@@ -319,6 +352,7 @@
319352
format("woff");
320353
font-weight: 100;
321354
font-style: normal;
355+
font-display: swap;
322356
}
323357

324358
@font-face {
@@ -329,6 +363,7 @@
329363
format("woff");
330364
font-weight: 300;
331365
font-style: normal;
366+
font-display: swap;
332367
}
333368

334369
@font-face {
@@ -339,6 +374,7 @@
339374
format("woff");
340375
font-weight: 400;
341376
font-style: normal;
377+
font-display: swap;
342378
}
343379

344380
@font-face {
@@ -349,6 +385,7 @@
349385
format("woff");
350386
font-weight: 600;
351387
font-style: normal;
388+
font-display: swap;
352389
}
353390

354391
@font-face {
@@ -359,6 +396,7 @@
359396
format("woff");
360397
font-weight: 700;
361398
font-style: normal;
399+
font-display: swap;
362400
}
363401

364402
@font-face {
@@ -369,6 +407,7 @@
369407
format("woff");
370408
font-weight: 100;
371409
font-style: normal;
410+
font-display: swap;
372411
}
373412

374413
@font-face {
@@ -379,6 +418,7 @@
379418
format("woff");
380419
font-weight: 300;
381420
font-style: normal;
421+
font-display: swap;
382422
}
383423

384424
@font-face {
@@ -389,6 +429,7 @@
389429
format("woff");
390430
font-weight: 400;
391431
font-style: normal;
432+
font-display: swap;
392433
}
393434

394435
@font-face {
@@ -399,6 +440,7 @@
399440
format("woff");
400441
font-weight: 600;
401442
font-style: normal;
443+
font-display: swap;
402444
}
403445

404446
@font-face {
@@ -409,6 +451,7 @@
409451
format("woff");
410452
font-weight: 700;
411453
font-style: normal;
454+
font-display: swap;
412455
}
413456

414457
@font-face {
@@ -419,6 +462,7 @@
419462
format("woff");
420463
font-weight: 100;
421464
font-style: normal;
465+
font-display: swap;
422466
}
423467

424468
@font-face {
@@ -429,6 +473,7 @@
429473
format("woff");
430474
font-weight: 300;
431475
font-style: normal;
476+
font-display: swap;
432477
}
433478

434479
@font-face {
@@ -439,6 +484,7 @@
439484
format("woff");
440485
font-weight: 400;
441486
font-style: normal;
487+
font-display: swap;
442488
}
443489

444490
@font-face {
@@ -449,6 +495,7 @@
449495
format("woff");
450496
font-weight: 600;
451497
font-style: normal;
498+
font-display: swap;
452499
}
453500

454501
@font-face {
@@ -459,6 +506,7 @@
459506
format("woff");
460507
font-weight: 700;
461508
font-style: normal;
509+
font-display: swap;
462510
}
463511

464512
body {

0 commit comments

Comments
 (0)