Existe-t-il un moyen de cibler Windows Mail 10 et 11 sans affecter le bureau Outlook ?
P粉722409996
P粉722409996 2024-03-27 12:55:14
0
1
442

J'ai un hack de code qui préserve le texte blanc sur fond noir dans la plupart des clients en mode sombre, à l'exception de Windows Mail 10 et 11.

<!--[if mso 16]> Les instructions conditionnelles fonctionnent sur le bureau Outlook (OL 365, OL 2021) mais ne s'affichent pas correctement dans Windows Mail 10 et 11. Windows Mail aime le CSS utilisé dans les blocs conditionnels <! --[if !mso 16]> Existe-t-il des codes de condition mso spécifiquement pour Windows Mail 10 et 11 ?

Existe-t-il un autre moyen d'appliquer des styles pour séparer Outlook (OL Office 365 Dark, Outlook 2021 Dark) et Windows Mail ?

<!--[if gte mso 16]>
  
    <style>
  
    .keep-white {
mso-style-textfill-type:gradient;
mso-style-textfill-fill-gradientfill-stoplist:"0 #FFFFFF 0 100000\,100000 #FFFFFF 0 100000";
color:#000000 !important;
}   

    </style>  
    
<![endif]-->
<style>
  
u + .body .gmail-screen { background:#000; mix-blend-mode:screen; }
u + .body .gmail-difference { background:#000; mix-blend-mode:difference; }
</style>
<!--[if (gte mso 9)|(IE)]>
<table align="center" cellpadding="0" cellspacing="0" border="0" style="width:640px;background-color:#000000;" role="presentation">
<tr>
<td align="center">
<![endif]-->

    <table role="presentation" style="width:100%;max-width:640px;Margin:0 auto;" cellspacing="0" cellpadding="0" bgcolor="#000000" align="center">
      <tr>
       <td class="body" style="background: linear-gradient(to bottom, #000000 0%, #000000 100%);max-width:640px;" width="100%" valign="top" align="center">
                 <!--[if gte mso 9]>
                 <v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:640px;" fillcolor="#000000">
                 <v:fill type="gradient" color2="#000000"/>
                 <v:textbox style="mso-fit-shape-to-text:true" inset="0,0,0,0">
                 <center>
                 <![endif]-->
        <table role="presentation" style="width:100%;max-width:640px;Margin:0 auto;" cellspacing="0" cellpadding="0" align="center">
             <tr>
              <td style="padding:40px 10px 40px;" align="center">
         <p style="padding:0;margin:0;font-family:'Open Sans',Helvetica, Arial,sans-serif;font-size:24px;line-height:34px;color:#ffffff;text-align:center;" class="txt16">
  <!--[if mso 16]><strong style="color:#ffffff;" class="keep-white"><![endif]-->      
  <!--[if !mso 16]><!-- --><strong style="font-weight:400;color:#ffffff;" class="gmail-screen"><span class="gmail-difference"><!--<![endif]--> 

Combo text hack. Works everywhere except Windows 10 &amp; 11 mail.

<!--[if mso 16]></strong><![endif]-->
<!--[if !mso 16]><!-- --></span></strong><!--<![endif]-->
        </p>
            </td>
           </tr>
       </table>
                 <!--[if gte mso 9]>
                 </center>
                 </v:textbox>
                 </v:rect>
                 <![endif]-->
        </td>
    </tr>
</table>
<!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]-->

J'ai appliqué l'instruction conditionnelle <!--[if mso 16]> pour Outlook et Windows Mail 10 et 11, mais j'ai constaté que le mode sombre de Windows Mail gère les CSS différemment du mode sombre d'Outlook.

P粉722409996
P粉722409996

répondre à tous(1)
P粉208286791

Mode sombre d'Outlook

Balise méta du mode sombre




Android/Outlook.com pour le mode sombre


  

Plus d'informations sur le mode sombre peuvent être trouvées ici :

https://www.litmus.com/blog/the-ultimate-guide-to-dark-mode-for-email-marketers/

Vous pouvez utiliser l'une des deux méthodes suivantes pour localiser Windows Mail :

/* Windows Mail (Phone & Surface) */
_:-ms-input-placeholder, :root .your-class-name {
  /* Replace this comment with your styles */
}

ou

/* Windows Mail (Phone & Surface) */
_:-ms-fullscreen, :root .your-class-name {
  /* Replace this comment with your styles */
}

Les deux articles ont été soumis à https://howtotarget.email/ par Mark Robbins.

Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!