_alert.scss
3 years ago
_background-variant.scss
3 years ago
_badge.scss
3 years ago
_border-radius.scss
3 years ago
_box-shadow.scss
3 years ago
_breakpoints.scss
3 years ago
_buttons.scss
3 years ago
_caret.scss
3 years ago
_clearfix.scss
3 years ago
_deprecate.scss
3 years ago
_float.scss
3 years ago
_forms.scss
3 years ago
_gradients.scss
3 years ago
_grid-framework.scss
3 years ago
_grid.scss
3 years ago
_hover.scss
3 years ago
_image.scss
3 years ago
_list-group.scss
3 years ago
_lists.scss
3 years ago
_nav-divider.scss
3 years ago
_pagination.scss
3 years ago
_reset-text.scss
3 years ago
_resize.scss
3 years ago
_screen-reader.scss
3 years ago
_size.scss
3 years ago
_table-row.scss
3 years ago
_text-emphasis.scss
3 years ago
_text-hide.scss
3 years ago
_text-truncate.scss
3 years ago
_transition.scss
3 years ago
_visibility.scss
3 years ago
_grid-framework.scss
82 lines
| 1 | // Framework grid generation |
| 2 | // |
| 3 | // Used only by Bootstrap to generate the correct number of grid classes given |
| 4 | // any value of `$grid-columns`. |
| 5 | |
| 6 | @mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) { |
| 7 | // Common properties for all breakpoints |
| 8 | %grid-column { |
| 9 | position: relative; |
| 10 | width: 100%; |
| 11 | padding-right: $gutter / 2; |
| 12 | padding-left: $gutter / 2; |
| 13 | } |
| 14 | |
| 15 | @each $breakpoint in map-keys($breakpoints) { |
| 16 | $infix: breakpoint-infix($breakpoint, $breakpoints); |
| 17 | |
| 18 | @if $columns > 0 { |
| 19 | // Allow columns to stretch full width below their breakpoints |
| 20 | @for $i from 1 through $columns { |
| 21 | .col#{$infix}-#{$i} { |
| 22 | @extend %grid-column; |
| 23 | } |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | .col#{$infix}, |
| 28 | .col#{$infix}-auto { |
| 29 | @extend %grid-column; |
| 30 | } |
| 31 | |
| 32 | @include media-breakpoint-up($breakpoint, $breakpoints) { |
| 33 | // Provide basic `.col-{bp}` classes for equal-width flexbox columns |
| 34 | .col#{$infix} { |
| 35 | flex-basis: 0; |
| 36 | flex-grow: 1; |
| 37 | min-width: 0; // See https://github.com/twbs/bootstrap/issues/25410 |
| 38 | max-width: 100%; |
| 39 | } |
| 40 | |
| 41 | @if $grid-row-columns > 0 { |
| 42 | @for $i from 1 through $grid-row-columns { |
| 43 | .row-cols#{$infix}-#{$i} { |
| 44 | @include row-cols($i); |
| 45 | } |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | .col#{$infix}-auto { |
| 50 | @include make-col-auto(); |
| 51 | } |
| 52 | |
| 53 | @if $columns > 0 { |
| 54 | @for $i from 1 through $columns { |
| 55 | .col#{$infix}-#{$i} { |
| 56 | @include make-col($i, $columns); |
| 57 | } |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | .order#{$infix}-first { order: -1; } |
| 62 | |
| 63 | .order#{$infix}-last { order: $columns + 1; } |
| 64 | |
| 65 | @for $i from 0 through $columns { |
| 66 | .order#{$infix}-#{$i} { order: $i; } |
| 67 | } |
| 68 | |
| 69 | @if $columns > 0 { |
| 70 | // `$columns - 1` because offsetting by the width of an entire row isn't possible |
| 71 | @for $i from 0 through ($columns - 1) { |
| 72 | @if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0 |
| 73 | .offset#{$infix}-#{$i} { |
| 74 | @include make-col-offset($i, $columns); |
| 75 | } |
| 76 | } |
| 77 | } |
| 78 | } |
| 79 | } |
| 80 | } |
| 81 | } |
| 82 |