M-J-Robbins / good-email-code

Email code resources website
http://www.goodemailcode.com
MIT License
91 stars 8 forks source link

MSO conditions are also impacting Google Pixel and mobile devices using the GMAIL app. #22

Closed tinatenatean closed 1 year ago

tinatenatean commented 1 year ago

When using the MSO conditions to accommodate Outlook and hide mobile elements, the condition works as expected in Outlook, but it has the side effect of also hiding the table cell in Google Pixel devices or devices using the Gmail app. Are these devices also using the Outlook engine and, if so, how to specify Outlook only?

For example:

`<!--[if !mso]--><!-->

                <td align="center" valign="top" style="display: none; mso-hide:all;"><a href="#" target="_blank">
                  <img class="logo" src="images/mobile.png" width="375" height="auto" alt="" style="display: inline-block; vertical-align: top; border: 0" />
                  </a>
                </td>

<!-- <![endif]-->`

This example hides it in both Outlook and mobile devices using the Gmail app and on Google Pixel devices. iPads and iPhones don't appear to be affected.

M-J-Robbins commented 1 year ago

<!--[if !mso]--><!--> is an if not mso comment so we would expect it to show in non-outlook clients. Then the display: none; mso-hide:all; should then hide this in most places but placing it on a <td> will have mixed results which is why it's still showing in some email clients