From 9c26a0b62093bc0ffafd7e0b9625888f929d1d84 Mon Sep 17 00:00:00 2001 From: Sangeeth Sudheer Date: Mon, 28 Oct 2024 13:23:56 +0530 Subject: Add font-family fallback and optimize font loading Optimized font loading by adding `font-display: swap`. Additionally, moved font-family values into CSS variables. --- assets/css/fonts.css | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'assets/css/fonts.css') 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; +} -- cgit v1.2.3