To clarify: you don't want equal outer widths, you want equal content widths (after removing the left/right edge padding)? You already have equal widths, but removing the edge padding means the first and last element have extra space for their content.
The math is more complex for this, because you actually need to break your grid slightly to achieve the right look. I think this will get you close:
li {
@include box-sizing(border-box);
border-right: 1px solid black;
&:first-child {
$span: span(2 of 6) - (gutter(6)/3);
@include span($span of 6 no-gutters);
padding-right: gutter(6);
}
&:nth-child(2) {
$span: span(2 of 6) + (gutter(6)*2/3);
@include span($span of 6);
}
&:last-child {
$span: span(2 of 6) - (gutter(6)/3);
@include span($span of 6 last no-gutters);
border: 0;
padding-left: gutter(6);
}
}
I'm using the span()
and gutter()
functions to calculate the exact widths you need (removing some gutter width from the outer elements, and adding that width to the inner), and then passing the result to the span
mixin, which creates your layout.
UPDATE (for larger gutters):
I'm not entirely sure what you have tried already, but this should do it:
@include with-layout((gutters: 20px / $c-width)) {
// your code here...
}
You can replace the 20px / $c-width
with whatever fraction you like. The larger the fraction, the larger your gutters.