From 3e1f99a07f9ef5f36d338976514b4f88d71f1c25 Mon Sep 17 00:00:00 2001 From: nr072 <26773186+nr072@users.noreply.github.com> Date: Sun, 8 Sep 2019 19:54:18 +0600 Subject: [PATCH] fix: keep toggle button color black for visibility in both themes --- static/script/theme-toggle.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static/script/theme-toggle.js b/static/script/theme-toggle.js index 42ec7c2..2c18a52 100644 --- a/static/script/theme-toggle.js +++ b/static/script/theme-toggle.js @@ -97,6 +97,9 @@ function toggleTheme(targetTheme) { document.body.style.backgroundColor = bodyColor; document.body.style.color = textColor; + // Keep toggle button color black for visibility, no matter in which theme. + toggleButton.style.color = "initial"; + // Store theme name, so theme will be retained even after page change. sessionStorage.setItem('theme', theme);