Skip to content
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

updated import.css to support dark mode (#1318) #1323

Conversation

matthewhegarty
Copy link
Contributor

Problem

If the browser is switched to 'dark mode', then the confirm import page does not render correctly (reported in #1318).

Solution

Updated import.css to override colors using the 'prefers-color-scheme: dark' media query.

Colors were chosen by finding the inverse of the existing color.

Acceptance Criteria

  • manually tested import using browser light and dark mode
  • checked the existing admin site to confirm that it renders correctly in dark mode.

darkmode1

@coveralls
Copy link

Coverage Status

Coverage remained the same at 98.063% when pulling 7fc0662 on matthewhegarty:css-dark-mode-fix-1318 into d9193ed on django-import-export:main.

Copy link
Contributor

@manelclos manelclos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@basictheprogram
Copy link

Active support for django 2.2 ended 01 Dec 2019.

Security support django 2.2 ends 01 Apr 2022.

Can this PR be merged back into the main and and another branch (like django-2.2) track the code base for, well, older releases of django?

@matthewhegarty
Copy link
Contributor Author

I think this PR needs to be refactored and implemented in the same way Django admin supports dark themes. I can't guarantee being able to do that soon, but at least any users who would like the dark theme support can pull v2.6.0 for now.
Any help is appreciated, so If you feel like looking into this please let me know.

@matthewhegarty
Copy link
Contributor Author

So I just had a quick look into django's implementation, and they simply have a dark_mode.css file, so the current implementation of using a custom import.css file is not too far away from that. Maybe we'll bring dark mode back for the 2.7.0 release in a month or so.

@matthewhegarty matthewhegarty deleted the css-dark-mode-fix-1318 branch February 22, 2023 08:41
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.

None yet

4 participants