A
A
artuh_a2019-12-03 23:11:22
css
artuh_a, 2019-12-03 23:11:22

How to cancel color inversion in dark theme when composing emails?

I'm drafting a letter. In applications from mailru and gmail, when the dark theme is enabled on the phone, the background and text colors are inverted. I tried with !important and media expression prefers-color-scheme:

<style type="text/css">
    @media (prefers-color-scheme: dark) {
      table {
        background-color: white !important;
        color: black !important;
      }
    }
  </style>
  <table style="background: #ffffff !important; color: black!important;">
    Тело письма
  </table>

But it didn't have any effect. Can anyone come across with setting the subject lines for email clients. How can I override this behavior so that, with any subject selected on the phone, the letter shows a white background and black text?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denisska, 2020-02-10
@Denisska

I don’t know about the dark theme of gmail, I didn’t find one))) For mailru mail, I found a solution by setting the background color to the background image, and the text is such an inline style -webkit-text-fill-color: #000000; everything is good in the night theme of mobile mailru .. but the same solution for Yandex mail does not work .. if anyone finds a solution for Yandex mail, please share

T
themax205, 2020-04-08
@themax205

Gmail App on iOS (iOS 13)
My email was initially dark with a light menu bar. iOS inverted dark colors to light colors and light colors to dark colors.
Gmail App on Android (Android 10)
It completely inverts colors: in dark mode, not only the UI is displayed, but the entire email...
Android 10 did not invert dark colors to light ones, but replaced my white line with a dark one.
media - not a slave.
[data-ogsc]
and/or [data-ogsb] - not a
GMAIL slave - NOTHING TO DO

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question