feat: add dark mode support (#962) - #1
Closed
vstudio79 wants to merge 1 commit into
Closed
Conversation
- Convert hardcoded Tailwind brand colors to CSS custom properties - Add theme-aware text colors (brand-text, brand-text-secondary) - Define light/dark CSS variables for all brand colors (bg, card, border, gold, muted) - Remove fragile !important light-mode CSS overrides - Update dashboard and portfolio pages to use theme-aware classes - Add OS prefers-color-scheme change listener to ThemeProvider - Add light mode select element styling Fixes astera-hq#962
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds proper dark mode / light mode support to
app/dashboardandapp/portfoliowithprefers-color-schemehandling, resolving astera-hq#962.Changes
Core theming infrastructure
tailwind.config.ts— Convert all hardcoded brand hex colors to CSS custom properties (var(--gold),var(--card), etc.) so colors automatically adapt to the active themeglobals.css— Expand CSS variable definitions for both:root(dark) and:root.light(light) including--bg-navy,--amber,--text-primary,--text-secondary. Remove fragile!importantlight-mode overrides that were used to patch hardcoded brand classesThemeProvider.tsx— AddmatchMedia.addEventListener("change")listener so the app follows OSprefers-color-schemechanges when the user has not explicitly toggled the themePage-level updates
app/dashboard/page.tsx— Replace alltext-white/hover:text-whitewith theme-awaretext-brand-text/hover:text-brand-textclassesapp/dashboard/credit/page.tsx— Same treatment for inputs, textareas, and hover statesapp/portfolio/page.tsx— Replacetext-whitewithtext-brand-text, replacebg-black/20overlays withbg-brand-navy/40What this fixes
!importantoverridesprefers-color-schemein real timetext-whitealways white regardless of themetext-brand-textresolves to--text-primary(dark in light mode)Testing
prefers-color-schemechanges are reflected when no explicit preference is set