Make admin light/dark mode follow real palettes end-to-end.
Local Build and Deploy / deploy (push) Successful in 55s

Light admin derives from the public light theme; dark keeps HK overrides. Remap inputs, cards, muted text, and kill the public wallpaper on admin so fonts and boxes stay readable in both modes.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
SimoandCursor committed 2026-07-15 21:37:25 +02:00
1 parent 94904f2ddb
commit 7b6c02c07d
7 files changed
+154 -19

No files matched your search

+60 -1
View File
@@ -95,7 +95,7 @@ html.dark textarea {
}
html.dark .admin-page table,
html.dark .admin-card {
border-color: rgba(255, 255, 255, 0.06);
border-color: var(--admin-border);
}
html.dark .currency,
html.dark .article-img {
@@ -262,6 +262,14 @@ html.dark .site-bg {
background-blend-mode: overlay;
}
/* Admin must not inherit the public wallpaper — solid HK canvas only. */
body.site-bg:has([data-admin]),
html.dark body.site-bg:has([data-admin]) {
background: var(--admin-canvas);
background-image: none;
background-blend-mode: normal;
}
.article-body {
line-height: 1.7;
@@ -1156,8 +1164,59 @@ body:has([data-admin]) {
--color-surface-text-readable: var(--admin-text);
--color-dropdown: var(--admin-surface);
--color-dropdown-text-readable: var(--admin-text);
--input-border-color: var(--admin-border);
--input-focus-color: var(--admin-accent);
--muted: var(--admin-text-muted);
--border-subtle: color-mix(in srgb, var(--admin-text-muted) 22%, transparent);
color: var(--admin-text);
background-color: var(--admin-canvas);
font-family: var(--font-family);
}
/* Admin forms / boxes follow admin tokens in both light and dark. */
body:has([data-admin]) input:not([type="checkbox"]):not([type="radio"]):not(
[type="range"]
):not([type="file"]):not([type="color"]),
body:has([data-admin]) select,
body:has([data-admin]) textarea {
background-color: var(--admin-surface-elevated);
color: var(--admin-text);
border-color: var(--admin-border);
caret-color: var(--admin-text);
}
body:has([data-admin]) input::placeholder,
body:has([data-admin]) textarea::placeholder {
color: var(--admin-text-muted);
opacity: 0.85;
}
body:has([data-admin]) .muted,
body:has([data-admin]) .admin-empty,
body:has([data-admin]) .text-muted-foreground {
color: var(--admin-text-muted);
}
body:has([data-admin]) .admin-card,
body:has([data-admin]) .admin-page table {
background: var(--admin-surface);
color: var(--admin-text);
border-color: var(--admin-border);
}
body:has([data-admin]) .btn-outline {
color: var(--admin-text);
border-color: var(--admin-border);
background: transparent;
}
body:has([data-admin]) .btn-outline:hover {
background: color-mix(in srgb, var(--admin-accent) 12%, transparent);
color: var(--admin-text);
}
/* Override public html.dark input hardcodes inside admin. */
html.dark body:has([data-admin]) input:not([type="checkbox"]):not(
[type="radio"]
):not([type="range"]):not([type="file"]):not([type="color"]),
html.dark body:has([data-admin]) select,
html.dark body:has([data-admin]) textarea {
background: var(--admin-surface-elevated);
color: var(--admin-text);
}
/* ── Details/summary open states for nav ──────────────────── */