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.
--
Ticket URL: <https://code.djangoproject.com/ticket/31259>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => Michel Le Bihan
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/31259#comment:1>
* needs_better_patch: 0 => 1
* stage: Unreviewed => Accepted
* needs_docs: 0 => 1
Comment:
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/31259#comment:2>
--
Ticket URL: <https://code.djangoproject.com/ticket/31259#comment:3>
Comment (by Matthias Kestenholz):
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?
--
Ticket URL: <https://code.djangoproject.com/ticket/31259#comment:4>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"b5cef91a91c9dbb697b65ef978a7de0b2c5cf564" b5cef91a]:
{{{
#!CommitTicketReference repository=""
revision="b5cef91a91c9dbb697b65ef978a7de0b2c5cf564"
Fixed #31259 -- Added admin dark theme.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31259#comment:5>
* Attachment "Screenshot_2021-01-14 Select group to change Django site
admin.png" added.
Comment (by Florian Apolloner):
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/31259#comment:6>
Comment (by GitHub <noreply@…>):
In [changeset:"257dfce6c87ebf11c429e65cd4eff30d852a14de" 257dfce]:
{{{
#!CommitTicketReference repository=""
revision="257dfce6c87ebf11c429e65cd4eff30d852a14de"
Refs #31259 -- Improved some color contrasts for admin dark theme.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31259#comment:7>
Comment (by GitHub <noreply@…>):
In [changeset:"f054468cac325e8d8fa4d5934b939b93242a3730" f054468c]:
{{{
#!CommitTicketReference repository=""
revision="f054468cac325e8d8fa4d5934b939b93242a3730"
Refs #31259 -- Made various dark theme adjustments.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31259#comment:8>
Comment (by Carlton Gibson <carlton.gibson@…>):
In [changeset:"4cf4c2df56af806f03299a264535bc34f1b1199a" 4cf4c2df]:
{{{
#!CommitTicketReference repository=""
revision="4cf4c2df56af806f03299a264535bc34f1b1199a"
[3.2.x] Refs #31259 -- Made various dark theme adjustments.
Backport of f054468cac325e8d8fa4d5934b939b93242a3730 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31259#comment:9>
Old 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.
New description:
Hello,
how can I OFF dark theme? without override css file
--
Comment (by KimSoungRyoul):
how can I OFF dark theme? without override css file
--
Ticket URL: <https://code.djangoproject.com/ticket/31259#comment:10>
Comment (by Mariusz Felisiak):
KimSoungRyoul, please don't change descriptions of closed tickets. I
removed your comment to restore the previous one.
--
Ticket URL: <https://code.djangoproject.com/ticket/31259#comment:10>
Comment (by KimSoungRyoul):
Replying to [comment:10 Mariusz Felisiak]:
> KimSoungRyoul, please don't change descriptions of closed tickets. I
removed your comment to restore the previous one.
sorry to change descriptions
--
Ticket URL: <https://code.djangoproject.com/ticket/31259#comment:11>