Refactor: Replace custom dark mode with Tailwind native system #26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR delivers a major cleanup and modernization of the front-end structure for the overall dark mode implementation.
It replaces the manual CSS-based dark mode system with Tailwind’s built-in dark mode utilities, improving maintainability, performance, and consistency.
✅ Summary of All Changes
🧩 1. Fixed HTML Structure
🌗 2. Replaced Custom Dark Mode CSS with Tailwind Native System
Old issue:
A file
css/dark-mode.csscontained ~14!importantoverrides to manually force dark mode colors.This approach conflicted with Tailwind’s utility classes and made theme switching unpredictable.
Fix implemented:
🗑️ Deleted
css/dark-mode.css.🧭 Configured Tailwind dark mode properly:
✅ Replaced CSS overrides with Tailwind’s
dark:classes, e.g.:bg-white → dark:bg-gray-900text-gray-900 → dark:text-whitetext-gray-600 → dark:text-gray-300border-gray-200 → dark:border-gray-700All cards, texts, and backgrounds now respond automatically to the selected theme.
⚙️ 3. JavaScript Improvements
js/theme-toggle.js.try/catcharoundlocalStoragecalls to prevent runtime errors in browsers with restricted storage.data-themeattribute and persists across reloads.🎨 4. UI and UX Enhancements
transition-transformandhover:shadow-2xlfor all cards.p-6,mb-3,gap-8) for balanced visual hierarchy.Related Issue
Fixes #13 — Dark mode conflicts and inconsistency.
Type of Change
Testing Done
localStoragedark:utilities render correctlyScreenshots
Before (Broken Layout + Manual CSS Dark Mode):
After (Tailwind Dark Mode + Fixed Layout):
✅ Clean structure
✅ Smooth theme switching
✅ Unified hover animations
✅ Consistent card spacing
✅ Ready to merge — all checks passed! 🇲🇷💻
This PR aligns the project fully with TailwindCSS best practices and eliminates manual CSS maintenance overhead.