question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dark mode styles makes our page unreadable

See original GitHub issue

The “dark mode styles” was added with: https://github.com/django-import-export/django-import-export/commit/7fc06627e2f12d719c03a6528cb63f05da256ca1 for: https://github.com/django-import-export/django-import-export/issues/1318

Our page doesn’t support dark mode yet. So these styles makes the diff unreadable.

A work-a-round, that we currently use is to add these styles in our css file:

@media (prefers-color-scheme: dark) {
  /*
  Work-a-round for https://github.com/django-import-export/django-import-export/pull/1323
  */
  html table.import-preview tr.skip {
    background-color: #d2d2d2;
  }

  html table.import-preview tr.new {
    background-color: #bdd8b2;
  }

  html table.import-preview tr.delete {
    background-color: #f9bebf;
  }

  html table.import-preview tr.update {
    background-color: #fdfdcf;
  }

  html .validation-error-container {
    background-color: #ffc1c1;
  }

  /*
  these declarations are necessary to forcibly override the
  formatting applied by the diff-match-patch python library
   */
  html table.import-preview td ins {
    background-color: #bdd8b2 !important;
  }

  html table.import-preview td del {
    background-color: #f9bebf !important;
  }
}

That will “reset” the dark colors to “normal” ones…

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
matthewhegartycommented, Sep 30, 2021

We have reverted this change and the updated css is now released in 2.6.1

0reactions
jediecommented, Sep 30, 2021

That is exactly how this “bug” looks like here:

grafik

Read more comments on GitHub >

github_iconTop Results From Across the Web

All Editable Text is Black, Illegible on Dark Theme
Occasionally, all the editable text in a work item will be black. This is illegible on the dark theme. I suggest making certain...
Read more >
Dark Mode Text Too Dark - Apple Support Communities
Dark Mode Text Too Dark · select all the text of the note · right click Font > Styles... · select the "Favorite...
Read more >
Dark Mode Logo Problems: Six Ideas to Improve Email Design
Optimizing logos in dark mode is a common struggle. Get six actionable ideas to solve dark mode logo problems and build better emails....
Read more >
How To Fix Outlook Dark Mode Problems (Email Design)
In this tutorial I'll explain how to stop the text in your HTML emails from changing color in Dark Mode in Outlook for...
Read more >
how to prevent force dark mode by system? - Stack Overflow
You can't force anything on users. If they prefer to view it with their own styles they can view it in their own...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found