user3356636
user3356636

Reputation: 113

Outlook in darkmode messes with the css

I have a emailTemplate that I want to have a light background. But Outlook in darkMode messes the css up. Sure there is a switch in outlook to "turn the ligths on" but I want to have white background all the time because everyone that gets the email will not know how to do that switch.

I have tried to add bgcolor to the table tag and the td tag and added backgroundColor to inline style, but without success.

I have also tried to force the button to have the same yellow color in darkmode, but it switches no matter what. I have also tried to search the internet but cant anything that covers outlook darkmode.

https://litmus.com/blog/email-designers-next-challenge-apple-dark-mode

<table bgcolor="#ffffff" style="width:70%;" align="center" border="0"      cellspacing="0" cellpadding="0">    <tbody>      <tr>        <td bgcolor="#ffffff">

<tr>
                        <td align="center" style="
                            display: inline-block;
                            background-color: #ffdd00;
                            border-radius: 3px;
                            padding: 18px 0px;
                            width: 100%;
                            text-align: center;
                            cursor: pointer;
                            ">
                          <a href="https://my.hogia.se" target="_blank" style="
                             text-decoration: none;
                             text-transform: uppercase;
                             color: #000;
                             font-family: Lato, Trebuchet, Verdana, Tahoma, Lucida Sans Unicode, Arial;
                             font-weight: 700;
                             font-size: 14px;
                             letter-spacing: 0.0625em;">Kom igång</a>
                        </td>
                      </tr>

StandardMode: enter image description here

DarkdMode: enter image description here

Upvotes: 0

Views: 2483

Answers (1)

sirdonlee
sirdonlee

Reputation: 21

Outlook365 and Outlook.com dark mode can't be overridden because Microsoft adds !important inline to every background color it finds including the system. I think they added this in June 2021.

Upvotes: 1

Related Questions