1 // Framework grid generation
3 // Used only by Bootstrap to generate the correct number of grid classes given
4 // any value of `$grid-columns`.
6 @mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {
7 // Common properties for all breakpoints
11 padding-right: ($gutter / 2);
12 padding-left: ($gutter / 2);
15 @each $breakpoint in map-keys($breakpoints) {
16 $infix: breakpoint-infix($breakpoint, $breakpoints);
18 // Allow columns to stretch full width below their breakpoints
19 @for $i from 1 through $columns {
29 @include media-breakpoint-up($breakpoint, $breakpoints) {
30 // Provide basic `.col-{bp}` classes for equal-width flexbox columns
39 max-width: 100%; // Reset earlier grid tiers
42 @for $i from 1 through $columns {
44 @include make-col($i, $columns);
48 .order#{$infix}-first { order: -1; }
50 .order#{$infix}-last { order: $columns + 1; }
52 @for $i from 0 through $columns {
53 .order#{$infix}-#{$i} { order: $i; }
56 // `$columns - 1` because offsetting by the width of an entire row isn't possible
57 @for $i from 0 through ($columns - 1) {
58 @if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0
59 .offset#{$infix}-#{$i} {
60 @include make-col-offset($i, $columns);