As a user I want a dark mode so I can use the archive comfortably in low-light environments #64
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User Journey
A user opens the archive in their browser. If their OS is set to dark mode, the UI renders in dark colors immediately — no flash of white. If their OS is set to light mode, the UI renders in light colors.
In the navigation bar, next to the language selector, a toggle button shows a moon icon (light mode) or a sun icon (dark mode). Clicking it switches the theme immediately and persists the choice across page reloads and browser sessions. The chosen theme overrides the OS preference until the user clicks the toggle again.
The PDF viewer adapts too: light in light mode, dark in dark mode. All pages — documents, persons, conversations, admin, login — respond to the theme.
E2E Scenarios
Implementation notes
Token system (
layout.cssonly — no hardcoded values anywhere)bg-canvas#f0efe9#0d0d0dbg-surface#ffffff#1a1a1abg-overlay#ffffff#242424bg-muted#f5f4ef#252525border-line#e4e2d7#2e2e2eborder-line-2#eeede8#222222text-ink#012851#f0efe9text-ink-2#6b7280#9ca3aftext-ink-3#9ca3af#6b7280bg-/text-accent#a1dcd8(mint)#00c7b1(CI turquoise)bg-/text-primary#012851(navy)#a1dcd8(mint)text-primary-fg#ffffff#012851bg-pdf-bg#ebebeb#1e1e1ebg-pdf-ctrl#d8d8d8#2a2a2atext-pdf-text#333333#d1d1d1Approach
tailwind.config.jskeeps only thecontentglob — all colors/fonts inlayout.css@theme inlinemaps semantic tokens to CSS variables → Tailwind generatesbg-surface,text-ink, etc.:root= light defaults;@media (prefers-color-scheme: dark) :root:not([data-theme=light])+[data-theme=dark]= dark<script>inapp.htmlapplies saved theme before first paint.sveltefiles use only semantic token utilities — zerobg-[#...],text-gray-*, rawbg-white/text-brand-navyfeat(frontend): dark mode with system-preference detection and manual toggleto As a user I want a dark mode so I can use the archive comfortably in low-light environments