Skip to content

feat: light mode polish and theme transition fixes#14

Merged
Raigato merged 5 commits intomainfrom
feat/light-mode
Mar 22, 2026
Merged

feat: light mode polish and theme transition fixes#14
Raigato merged 5 commits intomainfrom
feat/light-mode

Conversation

@Raigato
Copy link
Copy Markdown
Owner

@Raigato Raigato commented Mar 22, 2026

Summary

  • Theme toggle button: remove cyan border/outline, color adapts to theme via var(--fg)
  • Fix button label reverting after transition — defer text update to theme-transition-complete event so ThemeTransition's DOM restore doesn't overwrite it
  • Fix ASCII canvas staying broken after theme switch — locked was scoped inside isDesktop block and unreachable by the theme-changed listener; moved to outer scope
  • Lock ASCII canvas background to #0a0a0a with border-radius: 8px regardless of theme
  • Fix Contact section breaking on theme switch — header used bare <span> children causing ThemeTransition to scramble the flex container directly; replaced with <h2> to match other sections
  • Fix HTML structure lost after transition — ThemeTransition now restores innerHTML instead of textContent, preserving <br> tags and sibling elements
  • Add missing light mode overrides: text-white, hover:text-white, hover:text-white/70, hover:border-white
  • Replace hardcoded border-[#1e1e1e]/divide-[#1e1e1e] in Experience and FAQ with border-(--border)/divide-(--border) to fix inconsistent separator color
  • Darken text-white/50 and --accent-green in light mode to meet WCAG AA (4.5:1) contrast ratio

Raigato added 5 commits March 22, 2026 12:49
- Light Minimal palette: near-white bg, near-black text, darkened accents for WCAG AA
- [dark_mode]/[light_mode] ASCII bracket toggle in navbar
- Char scramble animation on theme switch (ASCII noise → resolves to new theme)
- FOUC prevention via inline script reading localStorage before paint
- CSS var overrides for hardcoded Tailwind colors in light mode
- Hero canvas bg reads --bg CSS var instead of hardcoded #0a0a0a
- Navbar scroll bg uses color-mix with CSS vars for theme awareness
- Playwright a11y test for light mode (axe-core)
…lors

- Remove cyan border/color from theme toggle button; use var(--fg) instead
- Fix ThemeTransition overwriting button label by deferring text update to
  theme-transition-complete event (fired after animation restores originals)
- Fix ASCII canvas not redrawing after theme switch by dispatching theme-changed
  event and moving `locked` out of the isDesktop block so it stays in scope
- Lock ASCII canvas background to #0a0a0a with rounded corners regardless of theme
- Add missing light mode overrides for text-white, hover:text-white,
  hover:text-white/70, and hover:border-white
- Replace hardcoded border-[#1e1e1e]/divide-[#1e1e1e] in Experience and FAQ
  with border-(--border)/divide-(--border) to fix inconsistent separator colors
- text-white/50 → rgba(0,0,0,0.62) for 5.4:1 contrast on #f8f8f8
- accent-green → #1a6b40 for sufficient contrast on light background
- Restore innerHTML instead of textContent so <span> children and <br>
  tags survive the scramble animation
- Use <h2> for Contact section label to match other sections, preventing
  the flex header div from being scrambled (and 06/06 from shifting)
@Raigato Raigato changed the title feat: light mode with ASCII char scramble transition feat: light mode polish and theme transition fixes Mar 22, 2026
@Raigato Raigato merged commit 38c7c61 into main Mar 22, 2026
4 checks 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.

1 participant