#32512: autocomplete_fields not displaying correctly in dark theme
-------------------------------------+-------------------------------------
Reporter: Simon Willison | Owner: Michel Le
| Bihan
Type: Bug | Status: assigned
Component: contrib.admin | Version: 3.2
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Matthias Kestenholz):
Something like this fixes it:
{{{
diff --git a/django/contrib/admin/static/admin/css/autocomplete.css
b/django/contrib/admin/static/admin/css/autocomplete.css
index 88e9eacb9a..f1d5f50550 100644
--- a/django/contrib/admin/static/admin/css/autocomplete.css
+++ b/django/contrib/admin/static/admin/css/autocomplete.css
@@ -190,8 +190,15 @@ select.admin-autocomplete {
border-bottom-right-radius: 0;
}
+.select2-container--admin-autocomplete .select2-search--dropdown {
+ background: var(--body-bg);
+ color: var(--body-fg);
+}
+
.select2-container--admin-autocomplete .select2-search--dropdown
.select2-search__field {
border: 1px solid var(--border-color);
+ background: var(--body-bg);
+ color: var(--body-fg);
}
.select2-container--admin-autocomplete .select2-search--inline
.select2-search__field {
@@ -257,7 +264,7 @@ select.admin-autocomplete {
.select2-container--admin-autocomplete .select2-results__option--
highlighted[aria-selected] {
background-color: var(--primary);
- color: var(--body-bg);
+ color: var(--header-link-color);
}
.select2-container--admin-autocomplete .select2-results__group {
}}}
But I think we should introduce a `--primary-fg` variable (or something)
which can be used to make text appearing on a `--primary` background
readable, instead of (ab)using `--header-link-color` outside the header so
much. This also applies to the nav sidebar etc.
--
Ticket URL: <https://code.djangoproject.com/ticket/32512#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.df727e609f57b3e76b384bf1abdde18e%40djangoproject.com.