From 485f58c61dc544e68cab0dd45f2ef2acbc379a14 Mon Sep 17 00:00:00 2001 From: James Chapman Date: Sat, 5 Oct 2024 17:41:24 +0100 Subject: [PATCH] Serve fonts locally --- Groceries/Components/Layout.razor | 1 + Groceries/libman.json | 4 ++++ Groceries/wwwroot/css/main.css | 10 +--------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Groceries/Components/Layout.razor b/Groceries/Components/Layout.razor index c9feba0..1f08170 100644 --- a/Groceries/Components/Layout.razor +++ b/Groceries/Components/Layout.razor @@ -9,6 +9,7 @@ + diff --git a/Groceries/libman.json b/Groceries/libman.json index a226e90..a4e3b9a 100644 --- a/Groceries/libman.json +++ b/Groceries/libman.json @@ -2,6 +2,10 @@ "version": "1.0", "defaultProvider": "unpkg", "libraries": [ + { + "library": "@fontsource-variable/inter@5.1.0", + "destination": "wwwroot/lib/inter/" + }, { "library": "@hotwired/turbo@8.0.4", "destination": "wwwroot/lib/hotwired/turbo/" diff --git a/Groceries/wwwroot/css/main.css b/Groceries/wwwroot/css/main.css index 8fa2398..f57a0f0 100644 --- a/Groceries/wwwroot/css/main.css +++ b/Groceries/wwwroot/css/main.css @@ -1,16 +1,8 @@ -@import url("https://rsms.me/inter/inter.css"); - :root { - font-family: "Inter", sans-serif; + font-family: "Inter Variable", sans-serif; color-scheme: light; } -@supports (font-variation-settings: normal) { - :root { - font-family: "Inter var", sans-serif; - } -} - * { margin: 0; padding: 0;