// Generate simple grid system.
// @see http://codepen.io/edmoore/pen/qFAGd
$max-cols: 6;
$col-widths: ();

// Cols are only on desktop
@include md {
	@for $i from 1 through $max-cols {
	    $w: (1/$i);

	    // If the width doesn't already exist
	    @if not index($col-widths, $w) {
	    	.columns-#{$i} .col {
	            width: $w * 100%;
	        }
	        // Add the width to the array
	        $col-widths: append($col-widths, $w, comma);
	    }

	    // Clear the floats on every new row
	    .columns-#{$i} .col:nth-child(#{$i}n+1) {
	    	clear: left;
	    }
	}


}
