Skip to content

Add dark mode toggle - #1

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

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

Conversation

Copilot AI commented Aug 14, 2026

Copy link
Copy Markdown

Summary

Adds dark mode support to the tiling experiment UI, as requested.

  • Introduced CSS custom properties for theme colors (--bg, --text, --border, --accent, etc.) in src/index.css.
  • Added a light theme (default) and a dark theme, selectable via data-theme attribute on <html>.
  • Falls back to the OS prefers-color-scheme: dark setting automatically when the user hasn't made an explicit choice.
  • Added a 🌙/☀️ toggle button in the app header that switches themes and persists the choice in localStorage.
  • Updated tile text color to use var(--text) so tile labels remain legible in dark mode.

Testing

  • npm run build succeeds.
  • npm run format:check passes.
  • Manually verified toggle switches CSS variables (via code review of styles applied).

🤖 Generated with GitHub Copilot

- Introduce CSS custom properties for theme colors in index.css, with a
  light default, a dark override via [data-theme='dark'], and automatic
  dark mode based on prefers-color-scheme when no explicit choice is made.
- Add a toggle button in the app header to switch between light/dark
  mode, persisting the choice in localStorage and applying it via the
  document's data-theme attribute.
- Use var(--text) for tile text color so tiles remain legible in dark
  mode.

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