From 8338374a8ddc97618cb1491cee4cc486dfc64304 Mon Sep 17 00:00:00 2001 From: Tom Flux Date: Fri, 14 Aug 2026 22:44:41 +0100 Subject: [PATCH] Follow the OS dark mode on the login page The board's dark theme is a saved preference, which there is no way to know before you're signed in, so the login page follows prefers-color-scheme instead. Palette taken from nullboard's .theme-dark. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01UU1vyTHj3uE9PJYSxRxwkU --- views/login.erb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/views/login.erb b/views/login.erb index 5443126..0d3c8a5 100644 --- a/views/login.erb +++ b/views/login.erb @@ -102,6 +102,30 @@ background: #fdeaea; color: #a33; } + + /* The board's own dark mode is a saved preference, which we can't know + before you're signed in — so follow the OS here instead. Colours are + nullboard's .theme-dark palette. */ + @media (prefers-color-scheme: dark) { + body { background: #22272b; color: #b3b9c0; } + + h1 { color: #d4d8dc; } + + .sub, label { color: #6f7780; } + + input[type=password] { + background: #2c3238; + border-color: #3b434b; + color: #d4d8dc; + } + + input[type=password]:focus { + border-color: #5c7a99; + box-shadow: 0 0 0 2px rgba(92, 122, 153, .3); + } + + .error { background: #3b2a2a; color: #e08585; } + }