summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authormimi89999 <michel@lebihan.pl>2021-01-12 09:59:40 +0100
committerCarlton Gibson <carlton.gibson@noumenal.es>2021-01-14 08:27:29 +0100
commitb5cef91a91c9dbb697b65ef978a7de0b2c5cf564 (patch)
treec374e7b13b4a6fbbd9979e0aa5108375fd72c746 /docs
parent64cc9dcdad0b60003f54b68e8cb8db715dbdc5ad (diff)
Fixed #31259 -- Added admin dark theme.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/contrib/admin/index.txt9
-rw-r--r--docs/releases/3.2.txt3
2 files changed, 10 insertions, 2 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
index aaf5134395..c6135ca5cb 100644
--- a/docs/ref/contrib/admin/index.txt
+++ b/docs/ref/contrib/admin/index.txt
@@ -2853,6 +2853,8 @@ creating your own ``AdminSite`` instance (see below), and changing the
Theming support
===============
+.. versionadded:: 3.2
+
The admin uses CSS variables to define colors. This allows changing colors
without having to override many individual CSS rules. For example, if you
preferred purple instead of blue you could add a ``admin/base.html`` template
@@ -2873,7 +2875,12 @@ override to your project:
</style>
{% endblock %}
-An up-to-date list of CSS variables is at
+A dark theme is defined, and applied respecting the `prefers-color-scheme`_
+media query.
+
+.. _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`.
``AdminSite`` objects
diff --git a/docs/releases/3.2.txt b/docs/releases/3.2.txt
index 66607916e0..2b0f0ee6ee 100644
--- a/docs/releases/3.2.txt
+++ b/docs/releases/3.2.txt
@@ -175,7 +175,8 @@ Minor features
* Read-only related fields are now rendered as navigable links if target models
are registered in the admin.
-* The admin now supports theming. See :ref:`admin-theming` for more details.
+* The admin now supports theming, and includes a dark theme that is enabled
+ according to browser settings. See :ref:`admin-theming` for more details.
* :attr:`.ModelAdmin.autocomplete_fields` now respects
:attr:`ForeignKey.to_field <django.db.models.ForeignKey.to_field>` and