Skip to content

Switch to Django-defined colors for dark mode support #59

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

Merged

Conversation

thibaudcolas
Copy link
Contributor

@thibaudcolas thibaudcolas commented Jun 5, 2021

See #57 – in particular the dark mode support problem:

Screenshot of four highlighted rows in Django Postgres Metrics in dark mode. The rows aren’t readable

This PR addresses this by switching to Django’s custom properties, which will automagically switch to variants that are compatible with dark mode. I’ve kept the previous values as fallbacks, for backwards compatibility with older versions of Django. Note this syntax doesn’t work in IE11 – if you think that’s an issue, we can also add a fallback for that.

Here is the result:

Recording of the same four rows as above, switching between light and dark mode

I believe the first 3 colors are the same as before. The last one is a bit of a hack, as I don’t think Django has an "info" color, but their breadcrumb color is intended to work well with both light and dark text.

@MarkusH MarkusH force-pushed the bug/dark-mode-support branch from bba8266 to 0de0660 Compare June 5, 2021 16:36
@codecov
Copy link

codecov bot commented Jun 5, 2021

Codecov Report

Merging #59 (938f733) into main (f811d32) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##              main       #59   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines          280       280           
  Branches        44        44           
=========================================
  Hits           280       280           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f811d32...938f733. Read the comment docs.

@MarkusH MarkusH force-pushed the bug/dark-mode-support branch from 0de0660 to 938f733 Compare June 5, 2021 16:39
@MarkusH
Copy link
Contributor

MarkusH commented Jun 5, 2021

@MarkusH MarkusH merged commit 938f733 into django-postgres-metrics:main Jun 5, 2021
@thibaudcolas thibaudcolas deleted the bug/dark-mode-support branch June 5, 2021 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy