Skip to content

Add dark mode with light/dark/system toggle#4

Closed
moberghammer wants to merge 1 commit intomainfrom
cm/add-dark-mode
Closed

Add dark mode with light/dark/system toggle#4
moberghammer wants to merge 1 commit intomainfrom
cm/add-dark-mode

Conversation

@moberghammer
Copy link
Member

Summary

  • Adds class-based dark mode using TailwindCSS v4 @custom-variant dark (&.dark) — no build step needed
  • Theme toggle in the header cycles light → dark → system, persisted via localStorage
  • Blocking script in <head> prevents flash of wrong theme on page load
  • All templates updated with dark: class counterparts for backgrounds, text, borders, and severity row colors
  • Dynamic user/DB badge colors adjusted via CSS filter: brightness(1.3) saturate(0.85) in dark mode

Test plan

  • Toggle between light, dark, and system modes on each page (home, instance, process table)
  • Verify severity row colors (red/orange/yellow) remain distinguishable in dark mode
  • Verify dynamic User/DB badge colors are readable in dark mode
  • Reload page and confirm theme preference persists
  • Enable HTMX auto-refresh and confirm dark mode is maintained during partial swaps
  • Switch OS dark mode preference while set to "system" — should update automatically

🤖 Generated with Claude Code

Uses TailwindCSS v4 class-based dark mode via @custom-variant.
Adds a persistent theme toggle (localStorage) in the header that
cycles light → dark → system, with a blocking script to prevent
flash of wrong theme. All templates get dark: class counterparts
for backgrounds, text, borders, and severity row colors. Dynamic
user/DB badge colors are adjusted via a CSS brightness filter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@moberghammer moberghammer changed the base branch from lejo/rewrite-to-go to main March 2, 2026 09:39
@moberghammer moberghammer deleted the cm/add-dark-mode branch March 2, 2026 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant