diff options
author | Sangeeth Sudheer <git@sangeeth.dev> | 2024-10-28 13:23:56 +0530 |
---|---|---|
committer | Sangeeth Sudheer <git@sangeeth.dev> | 2024-10-29 23:33:04 +0530 |
commit | 9c26a0b62093bc0ffafd7e0b9625888f929d1d84 (patch) | |
tree | 50113c928a320183d4e63f8a024b1f2b6f08af12 /assets/css/fonts.css | |
parent | 9a0905802287ba20f9e67a7d21a14fae1b9850c4 (diff) |
Add font-family fallback and optimize font loading
Optimized font loading by adding `font-display: swap`. Additionally,
moved font-family values into CSS variables.
Diffstat (limited to 'assets/css/fonts.css')
-rw-r--r-- | assets/css/fonts.css | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/assets/css/fonts.css b/assets/css/fonts.css index 8eb35db..5ace13e 100644 --- a/assets/css/fonts.css +++ b/assets/css/fonts.css @@ -3,6 +3,7 @@ src: url('/fonts/Literata/Literata-Light.woff2') format('woff2'); font-weight: light; font-style: normal; + font-display: swap; } @font-face { @@ -10,6 +11,7 @@ src: url('/fonts/Literata/Literata-LightItalic.woff2') format('woff2'); font-weight: light; font-style: italic; + font-display: swap; } @font-face { @@ -17,6 +19,7 @@ src: url('/fonts/Literata/Literata-SemiBold.woff2') format('woff2'); font-weight: bold; font-style: normal; + font-display: swap; } @font-face { @@ -24,6 +27,7 @@ src: url('/fonts/Literata/Literata-SemiBoldItalic.woff2') format('woff2'); font-weight: bold; font-style: italic; + font-display: swap; } @font-face { @@ -31,6 +35,7 @@ src: url('/fonts/Monaspace/MonaspaceArgon-Regular.woff') format('woff'); font-weight: normal; font-style: normal; + font-display: swap; } @font-face { @@ -38,4 +43,5 @@ src: url('/fonts/Monaspace/MonaspaceArgon-SemiBold.woff') format('woff'); font-weight: bold; font-style: normal; -}
\ No newline at end of file + font-display: swap; +} |