Yahoo Mail CSS Targeting 2020

大城市里の小女人 提交于 2020-05-16 08:59:05

问题


In 2019, email developers used to be able to target yahoo mail's css with the media query below:

<body>
<style>
@media screen yahoo {
.class-name {css}
}
</style>

My issue is with using web fonts. I need to target font-size for yahoo mail.

Is there a new method for targeting yahoo mail css in 2020?

Thanks


回答1:


Alice Li of Litmus has worked out that the new Yahoo filters for 2020 do not filter out weird unicode characters.

However, it appears to capture AOL & Yahoo (I say 'appears' because it comes up intermittently on Litmus previews):

<html>
<body>
<!-- START force fallback on Yahoo/AOL -->
<style>
    .& #√ .yahooAOLhide {display: none !important;}
    .& #√ .yahooAOLshow {display: block !important;}
</style>
<!-- END force fallback on Yahoo/AOL -->
<table id="√"><tr><td>  
<div class="yahooAOLhide">
    @@@@@@@@
</div>
<div class="yahooAOLshow" style="display: none;mso-hide:all;">
    YAHOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO!
</div>
</td></tr></table>
</body>
</html>

As you can see, the <style> section must be written in the <body> so as to work with the Yahoo app too.




回答2:


Here it is:

<!-- START force fallback on Yahoo -->
<style>
.& #☃ .yahoohide {display: none !important;}
.& #☃ .yahooshow {display: block !important;}
</style>
<!-- END force fallback on Yahoo -->


来源:https://stackoverflow.com/questions/59669117/yahoo-mail-css-targeting-2020

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!