Add dark mode support across website - #40
Conversation
There was a problem hiding this comment.
CHANGES REQUIRED
Hey @karrisujana, thanks for the dark mode PR! I have some concerns about the CSS approach before we merge.
The core issue: mixed theming strategy
You've set up CSS variables correctly in .dark:
.dark {
--background: #0f172a;
--foreground: #f8fafc;
}But then in several places you bypass those variables entirely with hardcoded values:
.dark .navbar { background-color: #111827; }
.dark h1, .dark h2, .dark h3, .dark p, .dark span { color: white; }This creates two problems:
- Inconsistency — if we ever update
--foregroundor--background, half the UI won't follow
Suggested fix:
Remove all the hardcoded .dark color overrides and let the CSS variables do the work. The variables are already defined correctly — trust them:
/* Remove these ❌ */
.dark h1, .dark h2, .dark h3, .dark p, .dark span { color: white; }
/* Let this do the work ✅ */
.dark { --foreground: #f8fafc; }Please address this and re-request review. Happy to chat if anything is unclear!
|
Hi @karrisujana, thanks for the effort on adding dark mode the toggle and variable setup look good. However, I noticed that in several places the code uses hardcoded colors (color: white;, background-color: #111827;) instead of the CSS variables you defined in .dark. This creates inconsistency: if we update --foreground or --background, those elements won’t follow the theme. For example: css Because of this mixed strategy, the PR is not correct as-is and needs revision before merging. Please update the code to rely on the CSS variables consistently, then re-request review |
|
Resolved the requested changes:
Ready for review |
|
@karrisujana |
|
The build step is passing now. I also resolved:
|
aa13069 to
8d6de5f
Compare
8d6de5f to
4833115
Compare

Pull Request
What did you change?
Added dark mode support across the website using a theme toggle button. Updated navbar, cards, buttons, topic pages, resource sections, and overall UI colors to support both light and dark themes with smooth transitions.
What issue does this fix?
Fixes #20
Checklist: