Skip to content

Add dark mode - #16

Open
Copilot wants to merge 1 commit into
mainfrom
copilot/add-dark-mode
Open

Add dark mode#16
Copilot wants to merge 1 commit into
mainfrom
copilot/add-dark-mode

Conversation

Copilot AI commented Aug 7, 2026

Copy link
Copy Markdown

Summary

Adds a dark mode toggle to the app.

  • Introduces CSS custom properties for light/dark themes (background, text, borders, cell colors) toggled via html[data-theme].
  • New ThemeToggle component (sun/moon button in the header) that switches themes, persists the choice in localStorage, and defaults to the OS prefers-color-scheme when no preference is stored.
  • Inline script in public/index.html sets the theme attribute before first paint to avoid a flash of the wrong theme.

Testing

  • Ran the app locally with npm run dev, verified toggle switches themes, persists across reload, and screenshots confirm correct light/dark styling for the board, keyboard input, and header.

- Add CSS custom properties for light/dark themes in styles.css, toggled via html[data-theme]
- Add ThemeToggle component that persists choice in localStorage and respects prefers-color-scheme by default
- Wire toggle into Header
- Add inline script in index.html to set the theme before first paint (avoids flash)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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