{"id":3011,"date":"2016-08-31T16:30:06","date_gmt":"2016-08-31T16:30:06","guid":{"rendered":"http:\/\/freshinbox.com\/blog\/?p=3011"},"modified":"2016-09-02T21:13:22","modified_gmt":"2016-09-02T21:13:22","slug":"gmail-supports-displaynone-and-gmail-ios-font-fix-update","status":"publish","type":"post","link":"https:\/\/freshinbox.com\/blog\/gmail-supports-displaynone-and-gmail-ios-font-fix-update\/","title":{"rendered":"Gmail Supports display:none and Gmail iOS Font Fix Update"},"content":{"rendered":"<p>The folks over at EmailMonks <a href=\"http:\/\/www.emailmonks.com\/blog\/email-coding\/gmail-supports-display-none-css\/\">discovered<\/a> that Gmail has started to support the display:none property. Gmail has always supported display:none!important, but not display:none. I will update this article shortly of why this is a positive development for email designers but first&#8230;<BR><BR><\/p>\n<h4>Gmail iOS Font Fix Update<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/freshinbox.com\/blog\/wp-content\/uploads\/2014\/12\/gmail-font-message.jpg\" alt=\"Gmail Font Size Increase Message\" width=\"350\"  class=\"aligncenter size-full wp-image-1236\" srcset=\"https:\/\/freshinbox.com\/blog\/wp-content\/uploads\/2014\/12\/gmail-font-message.jpg 600w, https:\/\/freshinbox.com\/blog\/wp-content\/uploads\/2014\/12\/gmail-font-message-300x94.jpg 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>One of my most often used hacks is the dash hack or &amp;nbsp; hack to prevent the Gmail iOS app from <a href=\"https:\/\/freshinbox.com\/blog\/gmail-on-ios-increases-font-size-on-some-emails\/\">drastically increasing the font size<\/a> for certain emails. The technique took advantage of the fact that Gmail doesn&#8217;t support display:none. With Gmail supporting display:none this technique no longer works.<\/p>\n<p>Thankfully we can leverage the fact that Gmail doesn&#8217;t support classes and ids to arrive at an alternative fix.<\/p>\n<p>Paste the following code in your email body (note no more display:none inline). Place it at the bottom of your email &#8211; you can place it at the top if your email is long as Gmail may not load the full email. Naturally make sure you&#8217;re not using the class gmailfix for something else :) <\/p>\n<pre class=\"lang:default decode:true   \" >\r\n&lt;div class=\"gmailfix\" style=\"white-space:nowrap; font:15px courier; line-height:0;\"&gt;\r\n&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; \r\n&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; \r\n&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;\r\n&lt;\/div&gt;<\/pre>\n<p>Then put this in the &lt;head&gt; of your email.<\/p>\n<pre class=\"lang:default decode:true   \" >\r\n&lt;style&gt;\r\n.gmailfix {\r\n display:none;\r\n display:none!important;\r\n}\r\n&lt;\/style&gt;<\/pre>\n<p>Technically display:none is sufficient, but some versions of Yahoo! is finicky so we add display:none!important for good measure.<\/p>\n<p><BR><BR><\/p>\n<div style=\"padding:10px; border: 2px solid #99C731;background-color:#FFF8DC;border-radius:5px;\">\n<form action=\"https:\/\/freshinbox1.createsend.com\/t\/i\/s\/adrmi\/\" method=\"post\" id=\"subForm\">\n<span class=\"fisub_header\" style=\"font-weight:bold;\">Subscribe to the #EmailGeeks Newsletter<\/span>\n<p><input id=\"fieldEmail\" name=\"cm-adrmi-adrmi\" type=\"email\" style=\"width:90%\" required placeholder=\"Your Email Address\" \/><\/p>\n<p><button type=\"submit\">Subscribe<\/button><\/p>\n<\/form>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>One of my most often used hacks is the dash hack or &amp;nbsp; hack to prevent the Gmail iOS app from <a href=\"http:\/\/freshinbox.com\/blog\/gmail-on-ios-increases-font-size-on-some-emails\/\">drastically increasing the font size<\/a> for certain emails. The technique took advantage of the fact that Gmail doesn&#8217;t support display:none. With Gmail supporting display:none this technique no longer works.<BR><BR><\/p>\n<p>Thankfully we can leverage the fact that Gmail doesn&#8217;t support classes and ids to arrive at an alternative fix.<\/p>\n","protected":false},"author":2,"featured_media":2349,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[23,2],"tags":[],"_links":{"self":[{"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/posts\/3011"}],"collection":[{"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/comments?post=3011"}],"version-history":[{"count":21,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/posts\/3011\/revisions"}],"predecessor-version":[{"id":3037,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/posts\/3011\/revisions\/3037"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/media\/2349"}],"wp:attachment":[{"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/media?parent=3011"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/categories?post=3011"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/freshinbox.com\/blog\/wp-json\/wp\/v2\/tags?post=3011"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}