Skip to content

feat: add dark mode toggle#41

Merged
magnus-madsen merged 2 commits intomasterfrom
feat/dark-mode
Mar 12, 2026
Merged

feat: add dark mode toggle#41
magnus-madsen merged 2 commits intomasterfrom
feat/dark-mode

Conversation

@magnus-madsen
Copy link
Member

@magnus-madsen magnus-madsen commented Mar 12, 2026

Summary

  • Adds a dark mode toggle button (moon/sun icon) next to the "Shareable Link" button in the menu bar
  • Uses CSS custom properties for all colors with [data-theme="dark"] overrides
  • Persists theme preference to localStorage; auto-detects system prefers-color-scheme on first visit
  • Inline script in index.html prevents flash of wrong theme on load
  • Ace editor switches between xcode (light) and tomorrow_night (dark) themes
  • Bootstrap btn-light buttons get dark overrides; data-bs-theme attribute set for other Bootstrap components

Test plan

  • Click the moon/sun toggle — UI switches between light and dark themes
  • Refresh the page — theme preference persists
  • Clear localStorage theme key, set OS to dark mode, refresh — should default to dark
  • Ace editor switches between xcode and tomorrow_night themes
  • Bootstrap buttons (Run, Shareable Link, links) adapt in both themes
  • Output pane text and spinner are visible in both themes
  • On screens ≤ 450px, toggle is hidden (matches existing menu bar behavior)

🤖 Generated with Claude Code

magnus-madsen and others added 2 commits March 12, 2026 18:04
…reference detection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@magnus-madsen magnus-madsen merged commit cfb3c84 into master Mar 12, 2026
2 checks passed
@magnus-madsen magnus-madsen deleted the feat/dark-mode branch March 12, 2026 17:08
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