fix: don't add empty :root{}

This commit is contained in:
Lewis Crichton 2023-09-02 21:34:55 +01:00
parent 0d66604be5
commit c0dff86cb2
No known key found for this signature in database

View file

@ -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", () => {