Create a new menu item for "Lights off" or "Darkmode"
Use pre-existing media query that gets adapted to be inherited for forced emulated dark mode
Describe the solution you'd like
Apple iOS Mail
Apple iOS Outlook
Maybe Samsung Dark mode will have to research which Apps support this
Steps it should do:
- Reset the email to a dark mode to emulate the above email clients
- Once its reset, apply the below CSS to the relevant sections
CSS in the email:
Existing CSS in the email that needs to be DOM manipulated to allow a dark mode on off status:
<!-- iOS Mail + iOs Outlook -->
<style type="text/css">
@media (prefers-color-scheme: dark) , (prefers-dark-interface) {
/* Cyber Monday Hijack, because top image was not PNG
html, body, th, td { background: #3d3d3d!important;}
*/
html, body, th, td { background: #2d2d2d!important;}
html, body, th, td, span, a { color: #dfdfdf!important; -webkit-text-fill-color: #dfdfdf!important;}
.logoW { width: 230px!important; }
.logoIcon { width: 200px!important; }
.logoIcon, .logoW { height: auto!important; padding: 10px 0px 10px 0px!important; }
.dmHide { display:none!important; }
.dmCTA { background-color:#000001!important; color:#feffff!important; }
.dmNoShad { box-shadow: none!important; }
/* Cyber Monday */
.dmHRL { border-bottom: 2px solid #dfdfdf!important; }
@media only screen and (min-width: 0px) and (max-width: 649px) {
.logoW { width: 94%!important; }
.logoIcon { width: 100%!important; }
}
}
</style>
Menu item toggle for "Lights off" or "Darkmode" (default off)
This could be done with a toggle class similar to the rest of the "email tools" methods:
Class applied to body: <body class="darkMode">
would be toggle ON
html, body, th, td { background: #2d2d2d!important;}
becomes:
.darkMode .darkMode th, darkMode td { background: #2d2d2d!important;}
HTML in the email:
Header swaps for dark mode friendly images:
Logos:
![Screen Shot 2019-11-15 at 20 37 49](https://user-images.githubusercontent.com/26332959/68974851-9661fd00-07e9-11ea-956f-b9f1a631cb06.png)
![Screen Shot 2019-11-15 at 20 54 10](https://user-images.githubusercontent.com/26332959/68975081-39b31200-07ea-11ea-944a-21183c5d7afe.png)
<a href="#HDRlink##" _label="HDR">
<img src="https://currys-ssl.cdn.dixons.com/css/themes/email/Assets/CORE/CPCW_logo_3x.png" alt="Currys PC World" width="230" height="47" class="dw3 heightAuto dmHide" style="display:block; margin:0 auto; font-family:gBlack, Arial Black, Helvetica, sans-serif; color:#6A2C6B;" border="0" />
<img src="https://currys-ssl.cdn.dixons.com/css/themes/email/iD/2019-2020/wk29/BlackTag_WhyWait/v1/CPCW_logo_dm2_3x.png" alt="Currys PC World" width="1" height="1" class="dw3- heightAuto- logoW" style="display:block; margin:0 auto; font-family:gBlack, Arial Black, Helvetica, sans-serif; color:#6A2C6B;" border="0" />
</a>
Slant removals:
![Screen Shot 2019-11-15 at 20 38 56](https://user-images.githubusercontent.com/26332959/68975152-5cddc180-07ea-11ea-9538-f6eed4812e34.png)
<!-- Slant PNG -->
<tr class="dmHide">
<td align="center" valign="top" class="fw"><img class="dw" align="left" width="650" src="https://currys-ssl.cdn.dixons.com/css/themes/email/iD/2019-2020/wk29/BlackTag_WhyWait/v1/slant2.png" alt=" " style="width:100%; max-width:100%; display:block; border:0px;" border="0" /></td>
</tr>
CTA glitches, for iOS Outlook Apps ONLY
Need for having a bespoke class on some CTAs when using a light background with black text:
iOS Outlook App on iPhone needs to be babysat as it ignores the <a>
call in CSS as:
Used this in iDM email: **
The layout was already dark mode friendly so didn't need to do the above code fixes
<!-- Outlook (Webmail-darkmode, iOS-darkmode) -->
<style type="text/css">
[data-ogsc] .footer a,
[data-ogsc] .darkM { color: #feffff!important; }
</style>
You have to put babysit class on CTAs <a class="darkM">
directly or this happens:
![Screen Shot 2019-11-15 at 21 01 31](https://user-images.githubusercontent.com/26332959/68975911-6831ec80-07ec-11ea-85f0-947610f35b83.png)
Maybe there is a better solution to ensure the CSS is picked up. Plan for testing more options.
Latest Currys Skeleton with Darkmode:
Footer-with-darkmode.zip
Further reading:
https://nshipster.com/dark-mode/
More Glitches to review:
![iOS_Outlook_App_DarkMode-ComeBack-1 (1)](https://user-images.githubusercontent.com/26332959/68976399-982dbf80-07ed-11ea-8317-5ff06b44ac02.jpg)
![iOS_Outlook_App_DarkMode-bharti-2](https://user-images.githubusercontent.com/26332959/68976413-9ebc3700-07ed-11ea-97f5-5ea3741eed2f.jpg)
![iOS_Outlook_App_DarkMode-4](https://user-images.githubusercontent.com/26332959/68976424-a67bdb80-07ed-11ea-8e4c-e9fad3036aa6.jpg)
![iOS_Outlook_App_DarkMode-Gaming-2](https://user-images.githubusercontent.com/26332959/68976441-ae3b8000-07ed-11ea-97e5-77bbde83debc.jpg)
Reference: Samsung Outlook App DarkMode
![Samsung_Outlook_App_DarkMode](https://user-images.githubusercontent.com/26332959/68976520-d4612000-07ed-11ea-90f3-8afedd8d7950.jpg)
Reference: Samsung Outlook App Light
![Samsung_Outlook_App_LightMode](https://user-images.githubusercontent.com/26332959/68976551-e773f000-07ed-11ea-8e32-d4817c786c51.jpg)
Mode
![fileiD](https://user-images.githubusercontent.com/26332959/70050830-cb32ca00-15c7-11ea-9880-4ea3ec18ce9a.jpg)
![fileSlant issue](https://user-images.githubusercontent.com/26332959/70050933-fb7a6880-15c7-11ea-83d5-ed49b0ba4d19.jpg)