Yahoo Mail Android App Limits Styles to Email Body
Ever since Gmail started supporting media queries, there has been a resurgence of interest in responsive email design. If you're using media queries in your design you should know that the Android version of Yahoo! Mail does not support the <style> tag in the head of an email.
Table of content
Android and iOS Versions of the Yahoo! Mail app.
Although the Android and iOS versions of the Yahoo! Mail app look similar, there is a key difference between them and that is the iOS version supports <style> in both the head as well as the body of the email whereas the Android version only supports <style> in the body. Here's a code snippet to test with:<html>
<head>
<style>
.head-class{background-color:green;}
@media only screen and (max-width: 2046px) {
.head-mq{background-color:green;}
}
</style>
</head><body>
<style>
.body-class{background-color:green;}
@media only screen and (max-width: 2046px) {
.body-mq{background-color:green;}
}
</style>
<B>HEAD STYLES:</B><BR>
Class:<BR>
<div class="head-class" style="border:2px solid #444444;height:20px;width:100px"></div><BR>
Media Query:<BR>
<div class="head-mq" style="border:2px solid #444444;height:20px;width:100px"></div><BR>
<HR>
<B>BODY STYLES:</B><BR>
Class:<BR>
<div class="body-class" style="border:2px solid #444444;height:20px;width:100px"></div><BR>
Media Query:<BR>
<div class="body-mq" style="border:2px solid #444444;height:20px;width:100px"></div><BR>
</body>
</html>
This makes Yahoo! Mail's Android version an outlier in email clients as all other email clients that support the <style> tag either support them in the head and body or just in the head (in the case of Gmail). See this table for details.