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

Columns are breaking in mobile viewports

Open julkue opened this issue 7 years ago • 2 comments

How can we reproduce this bug?

This code:

<columns large="1" small="1">
  {{> icon name="spacer"}}
</columns>
<columns large="11" small="11">
  <span class="text">No new activity…</span>
</columns>

will generate a whitespace between the columns. This is no problem in Desktop viewports, as they are table cells (browsers apply display: table-cell; by default). However, in mobile viewports display: inline-block; is set and enforced with !important. This now means that the whitespace will count as width between the tables and a percentage width will no longer work. Therefore, the columns will break, even when they would fit into it (11 + 1 == 12).

What did you expect to happen?

Columns shouldn't break in mobile viewports, no inline-block should be set!

What happened instead?

Columns are breaking.

What email clients does this happen in?

Every mobile client, especially iPhone.

Solution for me is temporarily using:

<columns large="1" small="1">
  {{> icon name="spacer"}}
</columns><columns large="11" small="11">
  <span class="text">No new activity…</span>
</columns>

julkue avatar Apr 23 '18 13:04 julkue

the bug is caused by the additional whitespace that foundation is generating image

if anyone knows any solution other than mixing the formatting, I am all ears

mhamri avatar Oct 08 '21 17:10 mhamri

the issue come from this line of code in inky image

mhamri avatar Oct 08 '21 17:10 mhamri