From 81cd109449bee56b92f44fc5969e89548eba4ada Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 17 Nov 2025 10:49:31 +0000 Subject: [PATCH] Refactor dark mode styles: update CSS variables for dark mode theme and set default background and text colors --- physics/templates/physics/exam_take.html | 39 ++++++++---------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/physics/templates/physics/exam_take.html b/physics/templates/physics/exam_take.html index a313b0d7..f617a2d0 100755 --- a/physics/templates/physics/exam_take.html +++ b/physics/templates/physics/exam_take.html @@ -58,35 +58,20 @@ - Also supports a manual `.dark-mode` class on body or a parent */ - :root { - --bg: #ffffff; - --text: #212529; - --muted: #6c757d; - --secondary: #6c757d; - --card-bg: #ffffff; - --card-border: #e9ecef; - --primary: #0d6efd; - --success: #198754; - --danger: #dc3545; - --feedback-bg: #f8f9fa; - --shadow: 0 1px 2px rgba(0,0,0,0.03); - } - @media (prefers-color-scheme: dark) { - :root { - --bg: #050607; - --text: #e6eef6; - --muted: #9aa4ad; - --card-bg: #0f1720; - --card-border: #1f2a33; - --primary: #6ea8ff; - --success: #36d07a; - --danger: #ff6b6b; - --feedback-bg: #071322; - --shadow: 0 2px 6px rgba(0,0,0,0.6); - } - body, .exam-take-container { background: var(--bg); color: var(--text); } + :root { + --bg: #050607; + --text: #e6eef6; + --muted: #9aa4ad; + --card-bg: #0f1720; + --card-border: #1f2a33; + --primary: #6ea8ff; + --success: #36d07a; + --danger: #ff6b6b; + --feedback-bg: #071322; + --shadow: 0 2px 6px rgba(0,0,0,0.6); } + body, .exam-take-container { background: var(--bg); color: var(--text); } /* Manual override: add `dark-mode` to body or a parent to force dark theme */ body.dark-mode, .dark-mode { color: var(--text); background: var(--bg); }