From c0dff86cb2cbf64baf9b323a832eb5e1aedf0e60 Mon Sep 17 00:00:00 2001 From: Lewis Crichton Date: Sat, 2 Sep 2023 21:34:55 +0100 Subject: [PATCH] fix: don't add empty :root{} --- src/utils/quickCss.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/quickCss.ts b/src/utils/quickCss.ts index ebf23cf48..14769fbb9 100644 --- a/src/utils/quickCss.ts +++ b/src/utils/quickCss.ts @@ -79,7 +79,7 @@ async function initThemes() { } themesStyle.textContent = links.map(link => `@import url("${link.trim()}");`).join("\n"); - themesStyle.textContent += `:root{${cssVars.join("\n")}}`; + if (cssVars.length > 0) themesStyle.textContent += `:root{${cssVars.join("\n")}}`; } document.addEventListener("DOMContentLoaded", () => {