foundation-emails
foundation-emails copied to clipboard
Using collapse doesn't seem to set the correct width on first and last cells
How can we reproduce this bug?
<row class="collapse">
<columns small="12" large="4">
<img src="assets/img/image1.jpg" />
<h3>One Word</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<br>
<a href="#">Read more</a></p>
</columns>
<columns small="12" large="4">
<img src="assets/img/image2.jpg" />
<h3>One Word</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<br>
<a href="#">Read more</a></p>
</columns>
<columns small="12" large="4">
<img src="assets/img/image3.jpg" />
<h3>One Word</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<br>
<a href="#">Read more</a></p>
</columns>
</row>
What did you expect to happen?
What happened instead?
What email clients does this happen in?
Only testing locally at the moment.
I have my global width set to 600px. I was expecting 3 columns to be 200px each. For some reason .first and .last are given a width of 208px.
Does this happen with the default global width?
@codedbypaul We're looking to narrow down how/when it's happening. Do you see this with different container widths including the default width? Can you see if changing that affect it's greater or less?
We're seeing it on the default container width, but only at the large breakpoint. When it switches to small, the column widths all match.
Does anyone have a work-around for this?
File _grid.scss:
//Collapsed logic
.collapse {
> tbody > tr > td.large-#{$i},
> tbody > tr > th.large-#{$i} {
padding-right: 0;
padding-left: 0;
width: -zf-grid-calc-px($i, $grid-column-count, $global-width) + $global-gutter;
}
//Gotta give it that extra love for the first and last columns.
td.large-#{$i}.first,
th.large-#{$i}.first,
td.large-#{$i}.last,
th.large-#{$i}.last {
width: -zf-grid-calc-px($i, $grid-column-count, $global-width) + ($global-gutter * 1.5);
}
}
For what purpose was added this 1.5 multiplier for .first/.last columns? -
($global-gutter * 1.5)