Fix dark mode

This commit is contained in:
rachidatecs 2023-08-03 11:08:09 -04:00
parent c4dfb5eec0
commit 5dd2fbaeda
No known key found for this signature in database
GPG key ID: 3CEBBFA7325E5525

View file

@ -79,6 +79,49 @@
"Noto Color Emoji"; "Noto Color Emoji";
} }
// Fold dark theme settings into our main CSS
// https://docs.djangoproject.com/en/4.2/ref/contrib/admin/#theming-support > dark theme note
@media (prefers-color-scheme: dark) {
:root,
html[data-theme="dark"] {
// Edit the primary to meet accessibility requ.
--primary: #23485a;
--primary-fg: #f7f7f7;
--body-fg: #eeeeee;
--body-bg: #121212;
--body-quiet-color: #e0e0e0;
--body-loud-color: #ffffff;
--breadcrumbs-link-fg: #e0e0e0;
--breadcrumbs-bg: var(--primary);
--link-fg: #81d4fa;
--link-hover-color: #4ac1f7;
--link-selected-fg: #6f94c6;
--hairline-color: #272727;
--border-color: #353535;
--error-fg: #e35f5f;
--message-success-bg: #006b1b;
--message-warning-bg: #583305;
--message-error-bg: #570808;
--darkened-bg: #212121;
--selected-bg: #1b1b1b;
--selected-row: #00363a;
--close-button-bg: #333333;
--close-button-hover-bg: #666666;
}
// Fix dark mode bug
body {
color: var(--body-fg)!important;
}
}
#branding h1 a:link, #branding h1 a:visited { #branding h1 a:link, #branding h1 a:visited {
color: var(--primary-fg); color: var(--primary-fg);
} }