zurb/foundation-sass — Issue #29: Got Grid Mixins?
Author: aesop1
Created: 2012-01-26 19:17:15+00:00
State: open

Unless I'm missing something, this gem could benefit from using grid mixins for concise semantic markup like:

@mixin container {
padding: 0 20px;
}

$rowname: ".row";

@mixin row($rowname) {
width: 100%;
max-width: 980px;
min-width: 727px;
margin: 0 auto;
#{$rowname} {
min-width: 0;
}
}

@mixin column {
margin-left: 4.4%;
float: left;
min-height: 1px;
position: relative;
&:first-child {
margin-left: 0;
}
}

$colwidth: 12;

@mixin columns($colwidth) {
@include column;
@if $colwidth == 1 {
width: 4.3%;
} @else if $colwidth == 2 {
width: 13%;
} @else if $colwidth == 3 {
width: 21.68%;
} @else if $colwidth == 4 {
width: 30.37%;
} @else if $colwidth == 5 {
width: 39.1%;
} @else if $colwidth == 6 {
width: 47.8%;
} @else if $colwidth == 7 {
width: 56.5%;
} @else if $colwidth == 8 {
width: 65.2%;
} @else if $colwidth == 9 {
width: 73.9%;
} @else if $colwidth == 10 {
width: 82.6%;
} @else if $colwidth == 11 {
width: 91.3%;
} @else if $colwidth == 12 {
width: 100%;
}
}

/* etc. */

What do you think?