雅虎邮箱 CSS 目标 2020 年
Yahoo Mail CSS Targeting 2020
在 2019 年,电子邮件开发人员曾经能够使用以下媒体查询来定位雅虎邮箱的 css:
<body>
<style>
@media screen yahoo {
.class-name {css}
}
</style>
我的问题是使用网络字体。我需要为雅虎邮件设置字体大小。
2020 年是否有针对雅虎邮件 css 的新方法?
谢谢
这里是:
<!-- START force fallback on Yahoo -->
<style>
.& #☃ .yahoohide {display: none !important;}
.& #☃ .yahooshow {display: block !important;}
</style>
<!-- END force fallback on Yahoo -->
Alice Li of Litmus 发现 2020 年新的 Yahoo 过滤器不会过滤掉奇怪的 unicode 字符。
但是,它似乎捕获了 AOL 和 Yahoo(我说 'appears' 因为它在 Litmus 预览中间歇性出现):
<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>
如您所见,<style>
部分必须写在 <body>
中才能与 Yahoo 应用程序一起使用。
我的电子邮件在所有版本的 Outlook 中都能正常工作,但在 Yahoo Mail 和 AOL Mail 上却 运行 遇到了问题。我尝试了雅虎媒体查询,但无法让它工作,所以我想我会尝试 @supports
,但它成功了。
@supports
not (box-sizing:border-box)
过滤掉了参数,变成了 @supports
而不是 (_filtered_a)
,从而变成了 true
然后定位到想要的元素。我的 Email on Acid 测试确认它适用于 AOL,我在我的测试 Yahoo 帐户上验证了它。
我正在使用这个系统来解决这个问题。我刚刚发现,通过 Gmail/Yahoo/Outlook 和 MacMail 的大量 try/error 测试,这似乎有效。 id="yahoo-show" 的元素仅在 Yahoo 中可见。但是我不知道它是否仍然适用于其他较少使用的邮件系统。 None 这里写的答案似乎对我来说很好,但是这个。
@media only screen{
[id="yahoo-show"]{display:block !important;}
}
/* Intended commented line (Otherwise it will appear in both Yahoo and MacMail App) */
a[id="yahoo-show"]{display:none !important;}
在 2019 年,电子邮件开发人员曾经能够使用以下媒体查询来定位雅虎邮箱的 css:
<body>
<style>
@media screen yahoo {
.class-name {css}
}
</style>
我的问题是使用网络字体。我需要为雅虎邮件设置字体大小。
2020 年是否有针对雅虎邮件 css 的新方法?
谢谢
这里是:
<!-- START force fallback on Yahoo -->
<style>
.& #☃ .yahoohide {display: none !important;}
.& #☃ .yahooshow {display: block !important;}
</style>
<!-- END force fallback on Yahoo -->
Alice Li of Litmus 发现 2020 年新的 Yahoo 过滤器不会过滤掉奇怪的 unicode 字符。
但是,它似乎捕获了 AOL 和 Yahoo(我说 'appears' 因为它在 Litmus 预览中间歇性出现):
<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>
如您所见,<style>
部分必须写在 <body>
中才能与 Yahoo 应用程序一起使用。
我的电子邮件在所有版本的 Outlook 中都能正常工作,但在 Yahoo Mail 和 AOL Mail 上却 运行 遇到了问题。我尝试了雅虎媒体查询,但无法让它工作,所以我想我会尝试 @supports
,但它成功了。
@supports
not (box-sizing:border-box)
过滤掉了参数,变成了 @supports
而不是 (_filtered_a)
,从而变成了 true
然后定位到想要的元素。我的 Email on Acid 测试确认它适用于 AOL,我在我的测试 Yahoo 帐户上验证了它。
我正在使用这个系统来解决这个问题。我刚刚发现,通过 Gmail/Yahoo/Outlook 和 MacMail 的大量 try/error 测试,这似乎有效。 id="yahoo-show" 的元素仅在 Yahoo 中可见。但是我不知道它是否仍然适用于其他较少使用的邮件系统。 None 这里写的答案似乎对我来说很好,但是这个。
@media only screen{
[id="yahoo-show"]{display:block !important;}
}
/* Intended commented line (Otherwise it will appear in both Yahoo and MacMail App) */
a[id="yahoo-show"]{display:none !important;}