From 661edc27c65c7528560a4b0e61c73d60171bd520 Mon Sep 17 00:00:00 2001 From: Vishnu Date: Tue, 1 Apr 2025 19:19:28 +0530 Subject: [PATCH] Update background color to use CSS variable and remove unused theme initialization code --- app/src/styles/base/base.scss | 2 +- app/src/utils/theme.ts | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/app/src/styles/base/base.scss b/app/src/styles/base/base.scss index 0dea569..e74c0ec 100644 --- a/app/src/styles/base/base.scss +++ b/app/src/styles/base/base.scss @@ -75,7 +75,7 @@ height: 100vh; // Full viewport height width: 100vw; // Full viewport width overflow: hidden; // Prevent scrollbars - background-color: #232323; + background-color: var(--background-color-gray); } // Root overlay styles diff --git a/app/src/utils/theme.ts b/app/src/utils/theme.ts index 03d2454..1fce2eb 100644 --- a/app/src/utils/theme.ts +++ b/app/src/utils/theme.ts @@ -17,15 +17,3 @@ export function toggleTheme() { document.documentElement.setAttribute('data-theme', newTheme); localStorage.setItem('theme', newTheme); } - -// Initialize theme on page load -setTheme(); - -// Example: Call toggleTheme() when a button is clicked -const toggleSwitch: Element | null = document.querySelector('#theme-switch'); - -if (toggleSwitch) { - toggleSwitch.addEventListener('click', toggleTheme); -} else { - console.warn("Theme switch button not found!"); -}