[Django] #35875: Dark mode support for directory_index view

3 views
Skip to first unread message

Django

unread,
Oct 29, 2024, 8:14:14 PM10/29/24
to django-...@googlegroups.com
#35875: Dark mode support for directory_index view
-------------------------------------+-------------------------------------
Reporter: Emme Bravo | Type:
| Cleanup/optimization
Status: new | Component: Generic
| views
Version: dev | Severity: Normal
Keywords: accessibility | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Django’s `directory_index` view uses simple HTML to display a list of
files (see
[https://thibaudcolas.github.io/django_admin_tests/v5.1/english/defaults/directory_index/
demo/directory_index]). It would be helpful if this was displayed in a
dark theme when the user’s operating system is configured to use one, just
like the Django admin.

This can be achieved with the `color-scheme` meta tag, which will tell the
browser the page is ready to adapt based on the user’s operating system
preferences:

`<meta name="color-scheme" content="light dark" />`
--
Ticket URL: <https://code.djangoproject.com/ticket/35875>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Reply all
Reply to author
Forward
0 new messages