-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Configurable dark mode (color scheme) #460
Conversation
Fix: Announce dark mode to the browser for scrollbar coloring
# Conflicts: # CHANGELOG.rst
Fix: deprecation warning for /
Fix: Leave more shadows dark in dark mode
Codecov Report
@@ Coverage Diff @@
## master #460 +/- ##
=======================================
Coverage 36.11% 36.11%
=======================================
Files 2 2
Lines 36 36
Branches 1 1
=======================================
Hits 13 13
Misses 23 23 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
This PR lets the dark mode css be configured by django CMS settings and as proposed in PR django-cms/django-cms#7329.
It also overrides the dark mode settings of Django's admin styling to allow consistent light mode even with OS preferences set to dark mode.
Dark mode settings of django CMS are communicated through the
data-color-scheme
attribute of the<html>
element. If unset the os sets the color scheme. If setdata-color-scheme="light"
the color scheme is light independently of the OS settings. Same is true for"dark"
.Know issue:
/admin
) always shows in light mode since the django CMS configuration is not available to the Django admin app by default.