From c0278a8c65d74441a6237e0a90c08f8b7b263d95 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Tue, 25 Jul 2023 04:54:47 +0000
Subject: [PATCH] font loading options, optimize css

---
 quartz/theme.ts |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/quartz/theme.ts b/quartz/theme.ts
index 2860e2c..b01bfdc 100644
--- a/quartz/theme.ts
+++ b/quartz/theme.ts
@@ -24,13 +24,17 @@
 const DEFAULT_SANS_SERIF =
   '-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif'
 const DEFAULT_MONO = "ui-monospace, SFMono-Regular, SF Mono, Menlo, monospace"
+
 export function googleFontHref(theme: Theme) {
   const { code, header, body } = theme.typography
   return `https://fonts.googleapis.com/css2?family=${code}&family=${header}:wght@400;700&family=${body}:ital,wght@0,400;0,600;1,400;1,600&display=swap`
 }
 
 export function joinStyles(theme: Theme, ...stylesheet: string[]) {
-  return `:root {
+  return `
+${stylesheet.join("\n\n")}
+
+:root {
   --light: ${theme.colors.lightMode.light};
   --lightgray: ${theme.colors.lightMode.lightgray};
   --gray: ${theme.colors.lightMode.gray};
@@ -55,6 +59,6 @@
   --tertiary: ${theme.colors.darkMode.tertiary};
   --highlight: ${theme.colors.darkMode.highlight};
 }
+`
 
-${stylesheet.join("\n\n")}`
 }

--
Gitblit v1.10.0