
1
Keep text white on a black background Outlook Office 365 and Windows Mail 10 & 11 Dark Mode
Is there a way to target OL Office 365 separately from Windows Mail 10 & 11? I'm currently using the <!--[if mso 16]>
conditional statement and although the css inside works for OL Office 365, it doesn't work with Windows Mail.
This is late, but incase anyone else comes across this. After trying for the last few hours different tricks out there, adding "color:auto" somehow magically fixed it in my case. Note, I have my original color first, then a second color at the end.
<p class="data-ogsc" style="font-family: 'Source Sans Pro', arial, sans-serif; font-weight:700; font-size: 20px; color: #ffffff; padding:15px 0px 15px 0px; margin:0; Letter-spacing:3px; text-align:center; border-top: thin solid #ffffff;color:auto;">
It was mentioned briefly in this article
https://webdesign.tutsplus.com/tutorials/how-to-fix-outlook-dark-mode-problems--cms-37718
Go to toolbar and select File, then select Office Account.
Under Office Theme, select while.
Pizza Tower
Select the back arrow at the top to return.
Hello,
To target Outlook Office 365 separately from Windows Mail 10 and 11 in terms of their dark mode settings, you can use conditional CSS statements. However, it's important to note that Windows Mail 10 and 11 do not support conditional statements like <!--[if mso 16]>. Instead, you can use media queries to target specific email clients.
For Outlook Office 365, you can use the following CSS to set the text color to white on a black background:
<style>
<!--[if mso]>
<style type="text/css">
body, table, td, a {
color: #ffffff !important;
}
</style>
<![endif]-->
</style>
However, for Windows Mail 10 and 11, you will need to use media queries to target these clients specifically in their dark mode:
<style>
@media (prefers-color-scheme: dark) {
body, table, td, a {
color: #ffffff !important;
}
}
</style>
The media query (prefers-color-scheme: dark) targets email clients that have dark mode enabled. By setting the text color to white, you ensure that it remains visible on a black background. TellPopeyes
Note that Windows Mail 10 and 11 may have variations in their rendering, and this approach is not guaranteed to work perfectly across all email clients. It's always recommended to test your emails in different clients to ensure proper display.