Gmail Android shrinking to fit screen
Hi,
I am beginning to use Ink as my goto source for building responsive email templates. Whilst working on private work and using Campaign Monitor for testing purposes I am seeing a recurring issue.
Gmail on Android is shrinking to fill the screen. Making text pretty unreadable. I have done some experimentation to isolate what is going on but have not identified what is causing it. So I have loaded the provided 'sidebar-hero' template into CM to test that. I used the Zurb inliner and did not let CM modify the code on import.
Code imported into Campaign Monitor
https://gist.github.com/freemagee/380c00cd3388cb1076f5#file-sidebar-hero-html
I know Ink is not responsive on Gmail Android, I do not mind about the layout. I just do not want the text to shrink. Any light shed on this is great. Thanks.
Example on Campaign Monitor

Hello, I've had the same problem and did some tests to find out what was going on. It comes form the min-width: 580px applied to the 'center'
More informations here: http://foundation.zurb.com/forum/posts/24189-font-size-on-gmail-with-zurb-ink
Hi Trouba,
Thank you for posting about this. I still use the Ink system and am happy I now know how to prevent this issue in Gmail. I will do some tests of my own and post back here.
Let's silently hope that Gmail responsive support can only get better!
Hi freemagee,
I had no feedback regarding this issue from the Zurb team. So if you find a way to get rid of the min-width:580px without breaking the grid let me know :) I will do some tests too.
Any conclusion?
You can get rid of the many min-width css but it breaks the grid. Sadly for now I'm back at customizing MailChimp templates until a solutions to this comes up.
I'm getting the same problem.
It's taken a while to come back to this, but I have tested the Zurb sidebar-hero template and commented out references to min-width. Tested on Campaign Monitor, inlined by Campaign Monitor.
The result is this:

Code used here:
https://gist.github.com/freemagee/9937feeefdfb561fbf93#file-sidebar-hero-mod-html
So as you can see the text is not squished anymore. It also looks fine in the other preview windows in Campaign Monitor:
http://ecomms.keyparker.co.uk/screens/r/05F6704F60D95E88
Obviously there are some visual problems, that could probably be addressed. They are outside my scope here.
So I am left feeling not completely sure what the min-width achieves in the Zurb template. I tried some of the techniques from this article:
http://webdesign.tutsplus.com/tutorials/creating-a-future-proof-responsive-email-without-media-queries--cms-23919
But they did not solve this particular problem in relation to Zurb Ink and Android Gmail. Any other insights please add it to the follow up.
This still seems to be an issue with Zurb. My advice is to design an email that works in gmail for mobile and other mobile clients that don't support media queries first. Once you're satisfied with how it looks there, then use media queries to optimize it for the mobile clients and desktop apps that do support media queries.
That is a good advice, but Zurb Ink is supposed to be an email framework, and you can't make an email framework without dealing with Gmail (or Inbox). So this issue is a big issue for Ink.
I agree with NelsonScott's advice (a bit like the mobile first approach in RWD) but I think trouba's reasoning is sound too.
The real world use of Zurb Ink with regards to myself is that I started a new work project and needed a robust framework to build a responsive email with. I am leaning on the many man hours that have been put into something like Zurb Ink that right now I can not personally spend on rolling my own framework. It's the same logic why I might use Zurb Foundation when prototyping a webapp etc.
Zurb Ink does pretty much meet my needs and I have used it many times since February when I first began working with it. But with Gmail Android becoming the primary Android email client I expect I will be trying something else out soon.
If you have a major Gmail app or Android userbase, consider Nicole Merlin's work from a few days ago on Tutsplus: Creating a Future-Proof Responsive Email Without Media Queries
--Keith
Moving at the speed of life, * *we are bound to collide with each other.
View My LinkedIn Profile http://www.linkedin.com/in/keithmiller
On Tue, Jun 16, 2015 at 10:18 AM, Neil Magee [email protected] wrote:
I agree with NelsonScott's advice (a bit like the mobile first approach in RWD) but I think trouba's reasoning is sound too.
The real world use of Zurb Ink with regards to myself is that I started a new work project and needed a robust framework to build a responsive email with. I am leaning on the many man hours that have been put into something like Zurb Ink that right now I can not personally spend on rolling my own framework. It's the same logic why I might use Zurb Foundation when prototyping a webapp etc.
Zurb Ink does pretty much meet my needs and I have used it many times since February when I first began working with it. But with Gmail Android becoming the primary Android email client I expect I will be trying something else out soon.
— Reply to this email directly or view it on GitHub https://github.com/zurb/ink/issues/122#issuecomment-112468116.
There is a general problem here which needs to be addressed. I have noticed some of the clients i work for, see the contentblocks that should only be visible for desktop also in the responsive mobile e-mail version. For example the contentblock for the header in which the client needs to upload a mobile image and a desktop image, are BOTH shown in the e-mail. This only happens on some android clients. honestly i have no idea how to fix it. It doesn't happen on other devices, just the android native mail client.
The resizing of the newsletter into your screen can simply be fixed by opening an e-mail, click on settings, (right top corner) and go to display settings to switch off "Auto Fit Content". This prevents the mailclient from opening and imimdiatly resizing to fit the entire mail in your screen.
For floating two columns on top of each other ink template it's using column splitting instead of table aligning. A issue that i found regarding this method is that display-block or float:left on "td" is not working for some android versions because the Doctype gets stripped. The solution is to use "th" instead of "td", but only for the "td's" inside the row with body content and the sidebar. You also have to make sure to override the font-weight and align for "th", cause by default it's bold and center.
@Raziel721 i can confirm your solution works. Hero! Now my columns are properly stacking underneath each other on Android.
This is what did it for me
<table class="row">
<tr>
<td class="wrapper">
Becomes:
<table class="row">
<tr>
<th class="wrapper">
And make sure you add new CSS for this TH. There are a few CSS lines that need to be editted (th added):
td, th {
word-break: break-word;
-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
border-collapse: collapse !important;
}
table, tr, td, th {
padding: 0;
vertical-align: top;
text-align: left;
}
td.wrapper,
th.wrapper {
padding: 20px 20px 0px 0px;
position: relative;
}
table.row td.last,
table.row th.last,
table.container td.last,
table.container th.last {
padding-right: 0px;
}
body, table.body, h1, h2, h3, h4, h5, h6, p, td, th {
color: #222222;
font-family: "Helvetica", "Arial", sans-serif;
font-weight: normal;
padding: 0;
margin: 0;
text-align: left;
line-height: 1.3;
}
body, table.body, p, td, th {
font-size: 14px;
line-height: 19px;
}
I am glad that I could help you! One suggestion:
- you don't have to change any css if you first inline your template and change after the td into th.
On 13 January 2016 at 16:42, Jordy [email protected] wrote:
@Raziel721 https://github.com/Raziel721 i can confirm your solution works. Hero! Now my columns are properly stacking underneath eachother on Android.
This is what did it for me
Becomes:
And make sure you add new CSS for this . Just copy the styles from the corresponding TD's. There are a few CSS lines that need to be editted
td, th { word-break: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; border-collapse: collapse !important; }
table, tr, td, th { padding: 0; vertical-align: top; text-align: left; } td.wrapper, th.wrapper { padding: 20px 20px 0px 0px; position: relative; }
table.row td.last, table.row th.last, table.container td.last { padding-right: 0px; }
— Reply to this email directly or view it on GitHub https://github.com/zurb/ink/issues/122#issuecomment-171335111.
@Raziel721 true dat! But i'm working with grunt-premailer, i don't like inlined styles in templates as a source template, only use inlined styles for production ready templates.
Thanks for the examples and comments everyone! Since version 2.0 is in the works, we are looking into this one for workarounds. @Raziel721 solution is a great one off workaround, though we need to have a more concrete implementation in the framework. We'll update with any findings we make as well.
In the meantime we'd love to hear more ideas like this!
One approach we're implementing for 2.0 is making the column element configurable. See: https://github.com/zurb/inky/pull/4 This might help with the flexibility and letting people choose
th's vstd's. We'll be looking into this solution further to see if we should default it toth's.For those using
th's have you noticed any inconsistencies in other email clients?
For those using th's have you noticed any inconsistencies in other email clients?
No, not yet! Tested this on a few templates i was working on. Nothing weird found so far.
I am glad to see that my solution was implemented in the new "Foundation for Emails 2" :)
Thank you tdhartwick!