diff options
Diffstat (limited to 'reference/js/setTheme.js')
-rw-r--r-- | reference/js/setTheme.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/reference/js/setTheme.js b/reference/js/setTheme.js index b90f629..41680b9 100644 --- a/reference/js/setTheme.js +++ b/reference/js/setTheme.js @@ -6,24 +6,24 @@ function setTheme(theme) { const darkgrey = rootstyle.getPropertyValue("--darkgrey"); const lightgrey = rootstyle.getPropertyValue("--lightgrey"); const white = rootstyle.getPropertyValue("--white"); - var backgroundColour0; - var backgroundColour1; + var bodyColour; + var backgroundColour; var foregroundColour; if (theme === "dark") { - backgroundColour0 = black; - backgroundColour1 = darkgrey; - foregroundColour = white; + bodyColour = black; + backgroundColour = darkgrey; + foregroundColour = white; } else if (theme === "light") { - backgroundColour0 = lightgrey; - backgroundColour1 = white; - foregroundColour = black; + bodyColour = lightgrey; + backgroundColour = white; + foregroundColour = black; } else { setTheme("dark"); return; } - root.style.setProperty("--backgroundColour0",backgroundColour0); - root.style.setProperty("--backgroundColour1",backgroundColour1); + root.style.setProperty("--bodyColour", bodyColour); + root.style.setProperty("--backgroundColour",backgroundColour); root.style.setProperty("--foregroundColour",foregroundColour); } |