Skip to content

Commit 5eaa77b

Browse files
devin-ai-integration[bot]Convex, Inc.
authored and
Convex, Inc.
committed
Add font-display: swap to docs font declarations (#35910)
This PR adds the `font-display: swap` property to all GT America font-face declarations in the docs package's custom.css file. This change improves font loading behavior by displaying a fallback font immediately while the custom font is still loading, which improves perceived performance and prevents "invisible text" during page load. GitOrigin-RevId: 63e8080cf6fcbe17fc9afd59f9782e0451003215
1 parent f69489d commit 5eaa77b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

npm-packages/docs/src/css/custom.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,25 @@
1212
@font-face {
1313
font-family: "GT America";
1414
font-weight: 400;
15+
font-display: swap;
1516
src: url(https://docs.convex.dev/fonts/GT-America-Standard-Regular.woff2);
1617
}
1718
@font-face {
1819
font-family: "GT America";
1920
font-weight: 500;
21+
font-display: swap;
2022
src: url(https://docs.convex.dev/fonts/GT-America-Standard-Medium.woff2);
2123
}
2224
@font-face {
2325
font-family: "GT America";
2426
font-weight: 700;
27+
font-display: swap;
2528
src: url(https://docs.convex.dev/fonts/GT-America-Standard-Bold.woff2);
2629
}
2730
@font-face {
2831
font-family: "GT America";
2932
font-weight: 900;
33+
font-display: swap;
3034
src: url(https://docs.convex.dev/fonts/GT-America-Standard-Black.woff2);
3135
}
3236

0 commit comments

Comments
 (0)