feat: fix light/dark mode toggle (#954)#990
Conversation
|
Hi @utksh1 — the frontend-checks failure is the pre-existing vite vulnerability (GHSA-fx2h-pf6j-xcff) on main — the same one blocking PR #646. This PR only modifies tailwind.config.js and index.css with no dependency changes. Could you add the vite exception to .audit-config.yaml on main so both PRs can be evaluated? |
utksh1
left a comment
There was a problem hiding this comment.
Thanks for the PR. I can’t merge this as-is: it only adds CSS/theme tokens and Tailwind color aliases, but it does not wire the application’s actual light/dark mode toggle behavior, and frontend-checks are failing on this PR. Please connect the theme state/toggle path end-to-end and get the frontend check green.
|
Closing this because it is marked gssoc:invalid after review. Please open a fresh, focused PR if you want to submit a corrected version. |
Description
The light/dark mode toggle button existed in the UI but clicking it had no effect. The ThemeContext and ThemeToggle components were already implemented correctly, but the theme switching was not working because the Tailwind and CSS configuration was incomplete.
Root causes fixed:
tailwind.config.jswas missingdarkMode: 'class'— Tailwind was ignoring thedarkclass added by ThemeContext to the HTML element.theme-lightCSS variable overrides were missing fromindex.css— switching to light mode had no visual effectbg-secondary,bg-primary,bg-tertiarycolor classes were not mapped to CSS variables in Tailwind config — components were not responding to theme changesRelated Issues
Closes #954
Type of Change
How Has This Been Tested?
Checklist