Skip to content

fix: dark mode actually works now#366

Merged
pradeeban merged 1 commit intoControlCore-Project:devfrom
avinxshKD:fix/dark-mode
Mar 9, 2026
Merged

fix: dark mode actually works now#366
pradeeban merged 1 commit intoControlCore-Project:devfrom
avinxshKD:fix/dark-mode

Conversation

@avinxshKD
Copy link

@avinxshKD avinxshKD commented Mar 8, 2026

toggle was setting data-theme on the html element but nothing was reading it, inline hardcoded colors everywhere. also reset on every refresh with no persistence.

  • moved inline styles on the toggle button to a CSS class so dark overrides can target it

  • initialState reads from localStorage, falls back to prefers-color-scheme

  • localStorage.setItem wired into the existing theme useEffect in App.jsx

  • dark overrides for .textField in codeEdit (was pure #f5f5f5 regardless of theme)

closes #361

@avinxshKD
Copy link
Author

@pradeeban fixed persistence + prefers-color-scheme fallback also and the toggle button's inline styles that were blocking dark overrides. Left the rest of the hardcoded colors alone since it's low priority anyway :p

image

@pradeeban pradeeban merged commit 69f2319 into ControlCore-Project:dev Mar 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants