foundation-emails icon indicating copy to clipboard operation
foundation-emails copied to clipboard

block-grid columns are not collapsing in Gmail app

Open RafaelFunchal opened this issue 11 years ago • 8 comments

Hey guys!

First, thank you for all your work. I really like all Zurb tools.

About my issue: I'm creating an email using block-grid because it has to be responsive in Gmail app, but the columns are not collapsing.

I'm following the doc:

<table class="container">
  <tr>
    <td>

      <table class="block-grid two-up">
        <tr>
          <td>

            Column #1

          </td><td> <!-- Make sure the tags are directly next to each other -->

            Column #2

          </td>
        </tr>
      </table>

    </td>
  </tr>
</table>

and I already inserted the media query:

@media only screen and (max-width: 600px) {
  table[class="container"] .block-grid td {
    width: 100% !important;
  }
}

Can you help me?

RafaelFunchal avatar Jan 16 '15 17:01 RafaelFunchal

This is old but I believe it's still relevant: https://www.campaignmonitor.com/forums/topic/7288/gmail-ios-app-ignores-meda-declaration-in-css/

Gmail apps and gmail itself are pretty behind the times when it comes to rendering emails.

lancesells avatar Jan 30 '15 21:01 lancesells

If you creative supports it, give this a shot: https://www.campaignmonitor.com/blog/post/4240/creating-a-centred-responsive-design-without-media-queries

brillman00 avatar Jan 30 '15 21:01 brillman00

Thanks guys, I'll look at these examples

RafaelFunchal avatar Feb 04 '15 08:02 RafaelFunchal

I also tried getting the block grid to work, but it is not collapsing in the GMail web client, GMail android client or Outlook.

I am a bit confused. The web page explicitly states that the block grid should be used for these otherwise tricky clients. But it does not for me and it seems that other people are having the same issues.

Has anyone ever gotten the block grid to work as advertised, or is the documentation simply wrong and the block grid is also not responsive on GMail/Outlook?

florian-sander avatar Mar 24 '15 13:03 florian-sander

Did anyone get to the bottom of this? I'm having the same issue.

raviedavie avatar May 01 '15 09:05 raviedavie

I'm also having the same problem. The block-grid seems to rely on media queries even though the documentation states otherwise.

urbackmk avatar May 13 '15 19:05 urbackmk

I also confirm the confusion that is caused by this. The language used in the docs implies that block-grid should be used when you can't rely on media queries, however that isn't the case.

In fact, Zurb Ink doesn't seem to be able to specify a way to make flexible column layout that isn't using visibility classes

mdedetrich avatar Aug 31 '15 09:08 mdedetrich

We're no longer supporting v1, however to clarify what I think was happening was that the block-grid was expected to break to 100% width. Gmail, however, doesn't respect media queries, as @urbackmk mentions. The intention of the block grid was to kind of fake responsiveness since display inline-block works. Basically, things would just stack if the viewport ran out of room.

This is still the current approach in v2. We chose not to use the complicated "ghost tables" that can help achieve a responsive email in gmail.

We ultimately chose to make a simpler approach that worked on the majority of clients. Again, it's not a perfectly responsive email, but the block-grid does fake it. Going to close this issue for now. Thanks!

tdhartwick avatar May 02 '16 23:05 tdhartwick