sass/smart-grid-columns.scss
@import "smart-grid-variables";

@mixin column() {
    float: left;
    margin: 0 0 0 $gutter;
    width: $one-column;
    &:first-child {
        margin-left: 0;
    }
    @if $flexbox-support == true {
        html.flexbox &  {
            float: none;
        }
    }
}
@mixin columns($count:1) {
    width: ($one-column * $count) + ($gutter * ($count - 1));
}
@mixin offset($columns:1) {
    margin-left: ($one-column * $columns) + ($gutter * ($columns + 1));
    &:first-child {
        margin-left: ($one-column * $columns) + ($gutter * $columns);
    }
}

@mixin column-set() {
    .columns {
        @include column;
        @each $i in $column-list {
            $selectors: ();
            @for $j from 2 to length($i) + 1 {
                $selectors: append($selectors, unquote("&.#{nth($i, $j)}"), comma);
            }
            #{$selectors} {
                @include columns(nth($i, 1));
            }
        }
        @each $i in $offset-list {
            $selectors: ();
            @for $j from 2 to length($i) + 1 {
                $selectors: append($selectors, unquote("&.offset-#{nth($i, $j)}"), comma);
            }
            #{$selectors} {
                @include offset(nth($i, 1));
            }
        }
    }
}
