#31259 closed New feature (fixed)
Add a dark theme to the admin module
Reported by: | Michel Le Bihan | Owned by: | Michel Le Bihan |
---|---|---|---|
Component: | contrib.admin | Version: | 3.0 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | yes |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | yes |
Description
Hello,
Dark themes are becoming more and more popular after the introduction of prefers-color-scheme
in browsers. There are many reasons for users to prefer a dark theme that are listed in multiple places.
Would it be possible for the admin module to have a dark theme? Is it in the scope of the project? If it is, I could try to add one.
Attachments (1)
Change History (12)
comment:1 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 5 years ago
Needs documentation: | set |
---|---|
Patch needs improvement: | set |
Triage Stage: | Unreviewed → Accepted |
comment:3 by , 5 years ago
Summary: | Please add a dark theme to the admin module → Add a dark theme to the admin module |
---|
comment:4 by , 4 years ago
I proposed starting to use CSS variables for styling the administration panel here: https://code.djangoproject.com/ticket/32018
I would hope that dark mode could be supported using something like
@media (prefers-color-scheme: dark) { html { --body-fg-color: #fff; --body-bg-color: #333; } }
Maybe you have some feedback on the other ticket and/or the proposed change?
by , 4 years ago
Attachment: | Screenshot_2021-01-14 Select group to change Django site admin.png added |
---|
comment:6 by , 4 years ago
Is this how it is supposed to look (see attachment). If yes, did people check the contrast ratios etc? The clear white of the checkboxes etc seem out of place to me as well as the heading in the sidebar.
follow-up: 11 comment:10 by , 4 years ago
KimSoungRyoul, please don't change descriptions of closed tickets. I removed your comment to restore the previous one.
comment:11 by , 4 years ago
Replying to Mariusz Felisiak:
KimSoungRyoul, please don't change descriptions of closed tickets. I removed your comment to restore the previous one.
sorry to change descriptions
Hi Michel, thanks for this.
Not a fan myself :) but
prefers-color-scheme
seems the way to go. Since you're keen to do the work, why not? :)First step, I guess, is to get it working. (If you can post some screenshots to the PR, that helps folks get started.)
Then we just need to think about what docs (if any beyond a release note) we might want.