1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #33182 -- Moved admin dark mode vars to separate stylesheet and template block.

This commit is contained in:
Matteo Vitali
2021-10-03 08:33:51 +02:00
committed by Carlton Gibson
parent 69af4d09ba
commit 3f1f8b9376
5 changed files with 48 additions and 39 deletions

View File

@@ -2848,13 +2848,19 @@ override to your project:
</style>
{% endblock %}
A dark theme is defined, and applied respecting the `prefers-color-scheme`_
media query.
The list of CSS variables are defined at
:file:`django/contrib/admin/static/admin/css/base.css`.
Dark mode variables, respecting the `prefers-color-scheme`_ media query, are
defined at :file:`django/contrib/admin/static/admin/css/dark_mode.css`. This is
linked to the document in ``{% block dark-mode-vars %}``.
.. _prefers-color-scheme: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme
The list of CSS variables are defined at
:file:`django/contrib/admin/static/admin/css/base.css`.
.. versionchanged:: 4.1
The dark mode variables were moved to a separate stylesheet and template
block.
``AdminSite`` objects
=====================