Project NOMAD is an offline-first knowledge and education server. Wikipedia, thousands of books, courses, maps, and optional local AI, all running on hardware you own with no internet required.
TypeScript
fix(ui): cover dark accent interaction states
Tiancheng-Xu99fe2ef5e0ad
diff --git a/admin/inertia/css/app.css b/admin/inertia/css/app.cssindex 90ebd143..0e6222d2 100644--- a/admin/inertia/css/app.css+++ b/admin/inertia/css/app.css@@ -126,6 +126,18 @@ body {color: var(--color-desert-green-foreground);}+[data-theme="dark"] .hover\:text-desert-green:hover {+ color: var(--color-desert-green-foreground);+}++[data-theme="dark"] .hover\:text-desert-green\/80:hover {+ color: color-mix(in oklab, var(--color-desert-green-foreground) 80%, transparent);+}++[data-theme="dark"] .group-hover\:text-desert-green:is(:where(.group):hover *) {+ color: var(--color-desert-green-foreground);+}+/* MapLibre popup styling for dark mode */[data-theme="dark"] .maplibregl-popup-content {background: #2a2918;diff --git a/admin/tests/unit/dark_mode_contrast.spec.ts b/admin/tests/unit/dark_mode_contrast.spec.tsindex c472f117..1abced11 100644--- a/admin/tests/unit/dark_mode_contrast.spec.ts+++ b/admin/tests/unit/dark_mode_contrast.spec.ts@@ -58,6 +58,21 @@ test('dark accent text clears WCAG AA without changing the accent background', (/\[data-theme="dark"\] \.text-desert-green\s*\{\s*color:\s*var\(--color-desert-green-foreground\)/,'dark text-desert-green utilities must use the foreground-only accent token')+ assert.match(+ css,+ /\[data-theme="dark"\] \.hover\\:text-desert-green:hover\s*\{\s*color:\s*var\(--color-desert-green-foreground\)/,+ 'dark hover:text-desert-green must use the foreground-only accent token'+ )+ assert.match(+ css,+ /\[data-theme="dark"\] \.hover\\:text-desert-green\\\/80:hover\s*\{[^}]*var\(--color-desert-green-foreground\)/,+ 'dark hover:text-desert-green/80 must use the foreground-only accent token'+ )+ assert.match(+ css,+ /\[data-theme="dark"\] \.group-hover\\:text-desert-green:is\(:where\(\.group\):hover \*\)\s*\{\s*color:\s*var\(--color-desert-green-foreground\)/,+ 'dark group-hover:text-desert-green must use the foreground-only accent token'+ )assert.ok(contrast('#ffffff', token('--color-desert-green')) >= 4.5,'the unchanged accent background must retain readable white text'