django-cms / djangocms-admin-style

django CMS Admin Style is a Django Theme tailored to the needs of django CMS.

Home Page:http://www.django-cms.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

djangocms-admin-style #nav-sidebar styles unreadable in dark mode

worthwhile-gwarner opened this issue · comments

Description

Tested on Win 11 and macOS 11.6 in Firefox 95.0b4 and Edge 95.0.1020.44. Logging into Django admin and accessing a Pages section reveals the #nav-sidebar element and its child tr tags to be set with a background-color of var(--body-bg), which inherits from base.css in Django admin (Django 3.2.6) where @meda (prefers-color-scheme: dark) sets the body bg to off-black. However no other surrounding admin bg styles are set similarly, and foreground is not set to a corresponding light color, leaving the text unreadable unless switching to a system light mode theme.

Steps to reproduce

  • Sign in to Django CMS admin with a dark system theme set on Win or Mac
  • Click Pages section

Expected behaviour

Expect either the admin interface overall will favor dark theme and set corresponding foreground colors for sufficient contrast, or preserve a light background for now to maintain legibility.

Actual behaviour

Nav sidebar links in Django CMS Admin when using system dark mode are illegible.

Screenshots

body-bg-sidebar-issue

Additional information (CMS/Python/Django versions)

  • Django CMS 3.9.0
  • Python 3.6.9
  • Django 3.2.6

Do you want to help fix this issue?

  • Yes, I want to help fix this issue and I will join #workgroup-pr-review on Slack to confirm with the community that a PR is welcome.
  • No, I only want to report the issue.

Hello @worthwhile-gwarner !

Thanks a lot, for creating the issue! And welcome, to the django CMS project :)

I will move your issue to the djangocms-admin-style repository. Because this Issue is related to the djangocms-admin-style package.

Ah, thank you @crydotsnake! 🙂 Apologies!

No problem ! 🙂

What is your version of the djangocms-admin-style package? Because I cannot reproduce the bug.

Current version in my piplock file is 2.0.2.

Sorry this appears to be a duplicate then of this outstanding issue: #438

Okay, the same version that I use :)

Thanks anywhere for reporting it!

I think the dark mode came in with django 3.2.

The app hasn't been updated since some work for django 3.1 so it needs work to support the dark theme.

This is essentially the same as #438

This will be solved by #443

@worthwhile-gwarner Dark mode works in version 3.1.