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 min-height: 1px; // Prevent columns from collapsing when empty
12 padding-right: ($gutter / 2);
13 padding-left: ($gutter / 2);
16 @each $breakpoint in map-keys($breakpoints) {
17 $infix: breakpoint-infix($breakpoint, $breakpoints);
19 // Allow columns to stretch full width below their breakpoints
20 @for $i from 1 through $columns {
30 @include media-breakpoint-up($breakpoint, $breakpoints) {
31 // Provide basic `.col-{bp}` classes for equal-width flexbox columns
40 max-width: none; // Reset earlier grid tiers
43 @for $i from 1 through $columns {
45 @include make-col($i, $columns);
49 .order#{$infix}-first {
53 @for $i from 1 through $columns {
54 .order#{$infix}-#{$i} {
59 // `$columns - 1` because offsetting by the width of an entire row isn't possible
60 @for $i from 0 through ($columns - 1) {
61 @if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0
62 .offset#{$infix}-#{$i} {
63 @include make-col-offset($i, $columns);