@import url(../z-helpers.scss);

$z-grid-columns: 12 !default;
$z-grid-width: 60px !default;
$z-grid-cutter: 20px !default;
$z-grid-center: true !default;

@for $n from 1 to $z-grid-columns {
    .z-grid-#{$n} {
        width: $z-grid-width * $n + ($z-grid-cutter * ( $n - 1 ));
    }
}

.z-grid_row {
    width: $z-grid-columns * ($z-grid-width + $z-grid-cutter);
    margin: 0 if($z-grid-center, auto, $z-grid-cutter);
    @include z-clearfix; }

.z-grid_column {
    margin: 0 $z-grid-cutter / 2;
    @include z-float-left;
    @include z-clearfix; }

.z-grid_row .z-grid_row {
    margin: 0 (-$z-grid-cutter/2);
    width: auto;
    display: inline-block; }
