// Mixins // ------------------------------------------------------ // Create the grid for a given size // This will loop over the number of columns and create a css class // for each. If it's the last gride size, then let's not add a float @mixin grid-core($size) @for $i from 1 through $grid-columns .col-#{$size}-#{$i} @include span-columns($i) // If it's not the screen-xs, then let's add push and pull helper classes @if $size != "xs" .col-#{$size}-push-#{$i} left: flex-grid($i, $grid-columns) + flex-gutter($grid-columns) .col-#{$size}-pull-#{$i} right: flex-grid($i, $grid-columns) + flex-gutter($grid-columns) // Create the collapse classes, i.e., .col-lg-collapse-2 .col-#{$size}-collapse-#{$i} // @include span-columns($i, gutterless) @include span-columns-gutterless($i) // Offsetting, i.e., .col-sm-offset-2 .col-#{$size}-offset-#{$i} @include shift($i) // Create columns centering for the given size .col-#{$size}-centered margin-left: auto !important margin-right: auto !important float: none !important // Omega Core builder @mixin omega-core($size) @for $i from 1 through $grid-columns .omega-#{$size}-#{$i} [class^="col-"], [class*=" col-"] @include omega(#{$i}n) // Thoughtbot doesn't want to add a gutterless display type for // span columns so we'll use this mixin for now. This will create // equal column widths without any margin/gutters @mixin span-columns-gutterless($span: $columns of $container-columns) $columns: nth($span, 1) $container-columns: container-span($span) $direction: get-direction($layout-direction, $default-layout-direction) $opposite-direction: get-opposite-direction($direction) display: block float: #{$opposite-direction} width: percentage($columns / $container-columns) &:last-child width: percentage($columns / $container-columns)