bootstrap 4.3.1 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of bootstrap might be problematic. Click here for more details.

Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +15 -1
  3. data/CHANGELOG.md +2 -14
  4. data/README.md +1 -1
  5. data/assets/javascripts/bootstrap-sprockets.js +7 -7
  6. data/assets/javascripts/bootstrap.js +1073 -1076
  7. data/assets/javascripts/bootstrap.min.js +4 -4
  8. data/assets/javascripts/bootstrap/alert.js +42 -49
  9. data/assets/javascripts/bootstrap/button.js +111 -64
  10. data/assets/javascripts/bootstrap/carousel.js +162 -177
  11. data/assets/javascripts/bootstrap/collapse.js +97 -122
  12. data/assets/javascripts/bootstrap/dropdown.js +163 -189
  13. data/assets/javascripts/bootstrap/modal.js +213 -194
  14. data/assets/javascripts/bootstrap/popover.js +51 -72
  15. data/assets/javascripts/bootstrap/scrollspy.js +80 -109
  16. data/assets/javascripts/bootstrap/tab.js +72 -79
  17. data/assets/javascripts/bootstrap/toast.js +96 -107
  18. data/assets/javascripts/bootstrap/tooltip.js +186 -201
  19. data/assets/javascripts/bootstrap/util.js +41 -20
  20. data/assets/stylesheets/_bootstrap-grid.scss +5 -4
  21. data/assets/stylesheets/_bootstrap-reboot.scss +4 -4
  22. data/assets/stylesheets/_bootstrap.scss +4 -4
  23. data/assets/stylesheets/bootstrap/_alert.scss +1 -0
  24. data/assets/stylesheets/bootstrap/_badge.scss +1 -1
  25. data/assets/stylesheets/bootstrap/_breadcrumb.scss +3 -2
  26. data/assets/stylesheets/bootstrap/_button-group.scss +1 -1
  27. data/assets/stylesheets/bootstrap/_buttons.scss +13 -8
  28. data/assets/stylesheets/bootstrap/_card.scss +42 -45
  29. data/assets/stylesheets/bootstrap/_carousel.scss +7 -7
  30. data/assets/stylesheets/bootstrap/_close.scss +2 -3
  31. data/assets/stylesheets/bootstrap/_code.scss +1 -1
  32. data/assets/stylesheets/bootstrap/_custom-forms.scss +38 -19
  33. data/assets/stylesheets/bootstrap/_dropdown.scss +7 -6
  34. data/assets/stylesheets/bootstrap/_forms.scss +26 -9
  35. data/assets/stylesheets/bootstrap/_functions.scss +63 -5
  36. data/assets/stylesheets/bootstrap/_grid.scss +32 -11
  37. data/assets/stylesheets/bootstrap/_images.scss +2 -2
  38. data/assets/stylesheets/bootstrap/_input-group.scss +21 -6
  39. data/assets/stylesheets/bootstrap/_list-group.scss +36 -31
  40. data/assets/stylesheets/bootstrap/_mixins.scss +3 -3
  41. data/assets/stylesheets/bootstrap/_modal.scss +26 -15
  42. data/assets/stylesheets/bootstrap/_nav.scss +7 -7
  43. data/assets/stylesheets/bootstrap/_navbar.scss +55 -17
  44. data/assets/stylesheets/bootstrap/_pagination.scss +5 -4
  45. data/assets/stylesheets/bootstrap/_popover.scss +8 -9
  46. data/assets/stylesheets/bootstrap/_print.scss +2 -2
  47. data/assets/stylesheets/bootstrap/_progress.scss +7 -3
  48. data/assets/stylesheets/bootstrap/_reboot.scss +39 -38
  49. data/assets/stylesheets/bootstrap/_spinners.scss +14 -4
  50. data/assets/stylesheets/bootstrap/_tables.scss +3 -3
  51. data/assets/stylesheets/bootstrap/_toasts.scss +4 -2
  52. data/assets/stylesheets/bootstrap/_type.scss +3 -3
  53. data/assets/stylesheets/bootstrap/_utilities.scss +2 -1
  54. data/assets/stylesheets/bootstrap/_variables.scss +58 -35
  55. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +5 -3
  56. data/assets/stylesheets/bootstrap/mixins/_badge.scss +1 -1
  57. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +27 -14
  58. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +11 -8
  59. data/assets/stylesheets/bootstrap/mixins/_caret.scss +8 -8
  60. data/assets/stylesheets/bootstrap/mixins/_float.scss +3 -3
  61. data/assets/stylesheets/bootstrap/mixins/_forms.scss +42 -49
  62. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +29 -15
  63. data/assets/stylesheets/bootstrap/mixins/_grid.scss +25 -7
  64. data/assets/stylesheets/bootstrap/mixins/_hover.scss +4 -4
  65. data/assets/stylesheets/bootstrap/mixins/_image.scss +2 -2
  66. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +1 -1
  67. data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
  68. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +2 -1
  69. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
  70. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +4 -3
  71. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +1 -1
  72. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +3 -2
  73. data/assets/stylesheets/bootstrap/mixins/_transition.scss +18 -8
  74. data/assets/stylesheets/bootstrap/utilities/_background.scss +2 -2
  75. data/assets/stylesheets/bootstrap/utilities/_borders.scss +1 -1
  76. data/assets/stylesheets/bootstrap/utilities/_interactions.scss +5 -0
  77. data/assets/stylesheets/bootstrap/utilities/_text.scss +4 -4
  78. data/bootstrap.gemspec +1 -1
  79. data/lib/bootstrap/version.rb +2 -2
  80. data/tasks/updater/network.rb +2 -2
  81. data/test/dummy_rails/app/assets/config/manifest.js +3 -0
  82. data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
  83. data/test/gemfiles/rails_6_0.gemfile +7 -0
  84. data/test/support/dummy_rails_integration.rb +3 -1
  85. data/test/test_helper.rb +18 -13
  86. metadata +11 -5
@@ -2,20 +2,22 @@
2
2
 
3
3
  // Contextual backgrounds
4
4
 
5
- @mixin bg-variant($parent, $color) {
5
+ @mixin bg-variant($parent, $color, $ignore-warning: false) {
6
6
  #{$parent} {
7
7
  background-color: $color !important;
8
8
  }
9
9
  a#{$parent},
10
10
  button#{$parent} {
11
- @include hover-focus {
11
+ @include hover-focus() {
12
12
  background-color: darken($color, 10%) !important;
13
13
  }
14
14
  }
15
+ @include deprecate("The `bg-variant` mixin", "v4.4.0", "v5", $ignore-warning);
15
16
  }
16
17
 
17
- @mixin bg-gradient-variant($parent, $color) {
18
+ @mixin bg-gradient-variant($parent, $color, $ignore-warning: false) {
18
19
  #{$parent} {
19
20
  background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important;
20
21
  }
22
+ @include deprecate("The `bg-gradient-variant` mixin", "v4.5.0", "v5", $ignore-warning);
21
23
  }
@@ -3,7 +3,7 @@
3
3
  background-color: $bg;
4
4
 
5
5
  @at-root a#{&} {
6
- @include hover-focus {
6
+ @include hover-focus() {
7
7
  color: color-yiq($bg);
8
8
  background-color: darken($bg, 10%);
9
9
  }
@@ -1,9 +1,22 @@
1
- // stylelint-disable property-blacklist
1
+ // stylelint-disable property-disallowed-list
2
2
  // Single side border-radius
3
3
 
4
+ // Helper function to replace negative values with 0
5
+ @function valid-radius($radius) {
6
+ $return: ();
7
+ @each $value in $radius {
8
+ @if type-of($value) == number {
9
+ $return: append($return, max($value, 0));
10
+ } @else {
11
+ $return: append($return, $value);
12
+ }
13
+ }
14
+ @return $return;
15
+ }
16
+
4
17
  @mixin border-radius($radius: $border-radius, $fallback-border-radius: false) {
5
18
  @if $enable-rounded {
6
- border-radius: $radius;
19
+ border-radius: valid-radius($radius);
7
20
  }
8
21
  @else if $fallback-border-radius != false {
9
22
  border-radius: $fallback-border-radius;
@@ -12,52 +25,52 @@
12
25
 
13
26
  @mixin border-top-radius($radius) {
14
27
  @if $enable-rounded {
15
- border-top-left-radius: $radius;
16
- border-top-right-radius: $radius;
28
+ border-top-left-radius: valid-radius($radius);
29
+ border-top-right-radius: valid-radius($radius);
17
30
  }
18
31
  }
19
32
 
20
33
  @mixin border-right-radius($radius) {
21
34
  @if $enable-rounded {
22
- border-top-right-radius: $radius;
23
- border-bottom-right-radius: $radius;
35
+ border-top-right-radius: valid-radius($radius);
36
+ border-bottom-right-radius: valid-radius($radius);
24
37
  }
25
38
  }
26
39
 
27
40
  @mixin border-bottom-radius($radius) {
28
41
  @if $enable-rounded {
29
- border-bottom-right-radius: $radius;
30
- border-bottom-left-radius: $radius;
42
+ border-bottom-right-radius: valid-radius($radius);
43
+ border-bottom-left-radius: valid-radius($radius);
31
44
  }
32
45
  }
33
46
 
34
47
  @mixin border-left-radius($radius) {
35
48
  @if $enable-rounded {
36
- border-top-left-radius: $radius;
37
- border-bottom-left-radius: $radius;
49
+ border-top-left-radius: valid-radius($radius);
50
+ border-bottom-left-radius: valid-radius($radius);
38
51
  }
39
52
  }
40
53
 
41
54
  @mixin border-top-left-radius($radius) {
42
55
  @if $enable-rounded {
43
- border-top-left-radius: $radius;
56
+ border-top-left-radius: valid-radius($radius);
44
57
  }
45
58
  }
46
59
 
47
60
  @mixin border-top-right-radius($radius) {
48
61
  @if $enable-rounded {
49
- border-top-right-radius: $radius;
62
+ border-top-right-radius: valid-radius($radius);
50
63
  }
51
64
  }
52
65
 
53
66
  @mixin border-bottom-right-radius($radius) {
54
67
  @if $enable-rounded {
55
- border-bottom-right-radius: $radius;
68
+ border-bottom-right-radius: valid-radius($radius);
56
69
  }
57
70
  }
58
71
 
59
72
  @mixin border-bottom-left-radius($radius) {
60
73
  @if $enable-rounded {
61
- border-bottom-left-radius: $radius;
74
+ border-bottom-left-radius: valid-radius($radius);
62
75
  }
63
76
  }
@@ -9,7 +9,7 @@
9
9
  border-color: $border;
10
10
  @include box-shadow($btn-box-shadow);
11
11
 
12
- @include hover {
12
+ @include hover() {
13
13
  color: color-yiq($hover-background);
14
14
  @include gradient-bg($hover-background);
15
15
  border-color: $hover-border;
@@ -17,10 +17,13 @@
17
17
 
18
18
  &:focus,
19
19
  &.focus {
20
- // Avoid using mixin so we can pass custom focus shadow properly
20
+ color: color-yiq($hover-background);
21
+ @include gradient-bg($hover-background);
22
+ border-color: $hover-border;
21
23
  @if $enable-shadows {
22
- box-shadow: $btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
24
+ @include box-shadow($btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5));
23
25
  } @else {
26
+ // Avoid using mixin so we can pass custom focus shadow properly
24
27
  box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
25
28
  }
26
29
  }
@@ -48,10 +51,10 @@
48
51
  border-color: $active-border;
49
52
 
50
53
  &:focus {
51
- // Avoid using mixin so we can pass custom focus shadow properly
52
54
  @if $enable-shadows and $btn-active-box-shadow != none {
53
- box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
55
+ @include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5));
54
56
  } @else {
57
+ // Avoid using mixin so we can pass custom focus shadow properly
55
58
  box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
56
59
  }
57
60
  }
@@ -62,7 +65,7 @@
62
65
  color: $color;
63
66
  border-color: $color;
64
67
 
65
- @include hover {
68
+ @include hover() {
66
69
  color: $color-hover;
67
70
  background-color: $active-background;
68
71
  border-color: $active-border;
@@ -87,10 +90,10 @@
87
90
  border-color: $active-border;
88
91
 
89
92
  &:focus {
90
- // Avoid using mixin so we can pass custom focus shadow properly
91
93
  @if $enable-shadows and $btn-active-box-shadow != none {
92
- box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5);
94
+ @include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5));
93
95
  } @else {
96
+ // Avoid using mixin so we can pass custom focus shadow properly
94
97
  box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
95
98
  }
96
99
  }
@@ -1,25 +1,25 @@
1
- @mixin caret-down {
1
+ @mixin caret-down() {
2
2
  border-top: $caret-width solid;
3
3
  border-right: $caret-width solid transparent;
4
4
  border-bottom: 0;
5
5
  border-left: $caret-width solid transparent;
6
6
  }
7
7
 
8
- @mixin caret-up {
8
+ @mixin caret-up() {
9
9
  border-top: 0;
10
10
  border-right: $caret-width solid transparent;
11
11
  border-bottom: $caret-width solid;
12
12
  border-left: $caret-width solid transparent;
13
13
  }
14
14
 
15
- @mixin caret-right {
15
+ @mixin caret-right() {
16
16
  border-top: $caret-width solid transparent;
17
17
  border-right: 0;
18
18
  border-bottom: $caret-width solid transparent;
19
19
  border-left: $caret-width solid;
20
20
  }
21
21
 
22
- @mixin caret-left {
22
+ @mixin caret-left() {
23
23
  border-top: $caret-width solid transparent;
24
24
  border-right: $caret-width solid;
25
25
  border-bottom: $caret-width solid transparent;
@@ -33,11 +33,11 @@
33
33
  vertical-align: $caret-vertical-align;
34
34
  content: "";
35
35
  @if $direction == down {
36
- @include caret-down;
36
+ @include caret-down();
37
37
  } @else if $direction == up {
38
- @include caret-up;
38
+ @include caret-up();
39
39
  } @else if $direction == right {
40
- @include caret-right;
40
+ @include caret-right();
41
41
  }
42
42
  }
43
43
 
@@ -51,7 +51,7 @@
51
51
  margin-right: $caret-spacing;
52
52
  vertical-align: $caret-vertical-align;
53
53
  content: "";
54
- @include caret-left;
54
+ @include caret-left();
55
55
  }
56
56
  }
57
57
 
@@ -1,14 +1,14 @@
1
1
  // stylelint-disable declaration-no-important
2
2
 
3
- @mixin float-left {
3
+ @mixin float-left() {
4
4
  float: left !important;
5
5
  @include deprecate("The `float-left` mixin", "v4.3.0", "v5");
6
6
  }
7
- @mixin float-right {
7
+ @mixin float-right() {
8
8
  float: right !important;
9
9
  @include deprecate("The `float-right` mixin", "v4.3.0", "v5");
10
10
  }
11
- @mixin float-none {
11
+ @mixin float-none() {
12
12
  float: none !important;
13
13
  @include deprecate("The `float-none` mixin", "v4.3.0", "v5");
14
14
  }
@@ -10,21 +10,36 @@
10
10
  //
11
11
  // Example usage: change the default blue border and shadow to white for better
12
12
  // contrast against a dark gray background.
13
- @mixin form-control-focus() {
13
+ @mixin form-control-focus($ignore-warning: false) {
14
14
  &:focus {
15
15
  color: $input-focus-color;
16
16
  background-color: $input-focus-bg;
17
17
  border-color: $input-focus-border-color;
18
18
  outline: 0;
19
- // Avoid using mixin so we can pass custom focus shadow properly
20
19
  @if $enable-shadows {
21
- box-shadow: $input-box-shadow, $input-focus-box-shadow;
20
+ @include box-shadow($input-box-shadow, $input-focus-box-shadow);
22
21
  } @else {
22
+ // Avoid using mixin so we can pass custom focus shadow properly
23
23
  box-shadow: $input-focus-box-shadow;
24
24
  }
25
25
  }
26
+ @include deprecate("The `form-control-focus()` mixin", "v4.4.0", "v5", $ignore-warning);
26
27
  }
27
28
 
29
+ // This mixin uses an `if()` technique to be compatible with Dart Sass
30
+ // See https://github.com/sass/sass/issues/1873#issuecomment-152293725 for more details
31
+ @mixin form-validation-state-selector($state) {
32
+ @if ($state == "valid" or $state == "invalid") {
33
+ .was-validated #{if(&, "&", "")}:#{$state},
34
+ #{if(&, "&", "")}.is-#{$state} {
35
+ @content;
36
+ }
37
+ } @else {
38
+ #{if(&, "&", "")}.is-#{$state} {
39
+ @content;
40
+ }
41
+ }
42
+ }
28
43
 
29
44
  @mixin form-validation-state($state, $color, $icon) {
30
45
  .#{$state}-feedback {
@@ -38,6 +53,7 @@
38
53
  .#{$state}-tooltip {
39
54
  position: absolute;
40
55
  top: 100%;
56
+ left: 0;
41
57
  z-index: 5;
42
58
  display: none;
43
59
  max-width: 100%; // Contain to parent when possible
@@ -48,18 +64,31 @@
48
64
  color: color-yiq($color);
49
65
  background-color: rgba($color, $form-feedback-tooltip-opacity);
50
66
  @include border-radius($form-feedback-tooltip-border-radius);
67
+
68
+ // See https://github.com/twbs/bootstrap/pull/31557
69
+ // Align tooltip to form elements
70
+ .form-row > .col > &,
71
+ .form-row > [class*="col-"] > & {
72
+ left: $form-grid-gutter-width / 2;
73
+ }
74
+ }
75
+
76
+ @include form-validation-state-selector($state) {
77
+ ~ .#{$state}-feedback,
78
+ ~ .#{$state}-tooltip {
79
+ display: block;
80
+ }
51
81
  }
52
82
 
53
83
  .form-control {
54
- .was-validated &:#{$state},
55
- &.is-#{$state} {
84
+ @include form-validation-state-selector($state) {
56
85
  border-color: $color;
57
86
 
58
87
  @if $enable-validation-icons {
59
88
  padding-right: $input-height-inner;
60
- background-image: $icon;
89
+ background-image: escape-svg($icon);
61
90
  background-repeat: no-repeat;
62
- background-position: center right $input-height-inner-quarter;
91
+ background-position: right $input-height-inner-quarter center;
63
92
  background-size: $input-height-inner-half $input-height-inner-half;
64
93
  }
65
94
 
@@ -67,18 +96,12 @@
67
96
  border-color: $color;
68
97
  box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
69
98
  }
70
-
71
- ~ .#{$state}-feedback,
72
- ~ .#{$state}-tooltip {
73
- display: block;
74
- }
75
99
  }
76
100
  }
77
101
 
78
102
  // stylelint-disable-next-line selector-no-qualifying-type
79
103
  textarea.form-control {
80
- .was-validated &:#{$state},
81
- &.is-#{$state} {
104
+ @include form-validation-state-selector($state) {
82
105
  @if $enable-validation-icons {
83
106
  padding-right: $input-height-inner;
84
107
  background-position: top $input-height-inner-quarter right $input-height-inner-quarter;
@@ -87,41 +110,23 @@
87
110
  }
88
111
 
89
112
  .custom-select {
90
- .was-validated &:#{$state},
91
- &.is-#{$state} {
113
+ @include form-validation-state-selector($state) {
92
114
  border-color: $color;
93
115
 
94
116
  @if $enable-validation-icons {
95
117
  padding-right: $custom-select-feedback-icon-padding-right;
96
- background: $custom-select-background, $icon $custom-select-bg no-repeat $custom-select-feedback-icon-position / $custom-select-feedback-icon-size;
118
+ background: $custom-select-background, $custom-select-bg escape-svg($icon) $custom-select-feedback-icon-position / $custom-select-feedback-icon-size no-repeat;
97
119
  }
98
120
 
99
121
  &:focus {
100
122
  border-color: $color;
101
123
  box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
102
124
  }
103
-
104
- ~ .#{$state}-feedback,
105
- ~ .#{$state}-tooltip {
106
- display: block;
107
- }
108
- }
109
- }
110
-
111
-
112
- .form-control-file {
113
- .was-validated &:#{$state},
114
- &.is-#{$state} {
115
- ~ .#{$state}-feedback,
116
- ~ .#{$state}-tooltip {
117
- display: block;
118
- }
119
125
  }
120
126
  }
121
127
 
122
128
  .form-check-input {
123
- .was-validated &:#{$state},
124
- &.is-#{$state} {
129
+ @include form-validation-state-selector($state) {
125
130
  ~ .form-check-label {
126
131
  color: $color;
127
132
  }
@@ -134,8 +139,7 @@
134
139
  }
135
140
 
136
141
  .custom-control-input {
137
- .was-validated &:#{$state},
138
- &.is-#{$state} {
142
+ @include form-validation-state-selector($state) {
139
143
  ~ .custom-control-label {
140
144
  color: $color;
141
145
 
@@ -144,11 +148,6 @@
144
148
  }
145
149
  }
146
150
 
147
- ~ .#{$state}-feedback,
148
- ~ .#{$state}-tooltip {
149
- display: block;
150
- }
151
-
152
151
  &:checked {
153
152
  ~ .custom-control-label::before {
154
153
  border-color: lighten($color, 10%);
@@ -170,17 +169,11 @@
170
169
 
171
170
  // custom file
172
171
  .custom-file-input {
173
- .was-validated &:#{$state},
174
- &.is-#{$state} {
172
+ @include form-validation-state-selector($state) {
175
173
  ~ .custom-file-label {
176
174
  border-color: $color;
177
175
  }
178
176
 
179
- ~ .#{$state}-feedback,
180
- ~ .#{$state}-tooltip {
181
- display: block;
182
- }
183
-
184
177
  &:focus {
185
178
  ~ .custom-file-label {
186
179
  border-color: $color;
@@ -15,12 +15,15 @@
15
15
  @each $breakpoint in map-keys($breakpoints) {
16
16
  $infix: breakpoint-infix($breakpoint, $breakpoints);
17
17
 
18
- // Allow columns to stretch full width below their breakpoints
19
- @for $i from 1 through $columns {
20
- .col#{$infix}-#{$i} {
21
- @extend %grid-column;
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
+ }
22
24
  }
23
25
  }
26
+
24
27
  .col#{$infix},
25
28
  .col#{$infix}-auto {
26
29
  @extend %grid-column;
@@ -33,15 +36,24 @@
33
36
  flex-grow: 1;
34
37
  max-width: 100%;
35
38
  }
39
+
40
+ @if $grid-row-columns > 0 {
41
+ @for $i from 1 through $grid-row-columns {
42
+ .row-cols#{$infix}-#{$i} {
43
+ @include row-cols($i);
44
+ }
45
+ }
46
+ }
47
+
36
48
  .col#{$infix}-auto {
37
- flex: 0 0 auto;
38
- width: auto;
39
- max-width: 100%; // Reset earlier grid tiers
49
+ @include make-col-auto();
40
50
  }
41
51
 
42
- @for $i from 1 through $columns {
43
- .col#{$infix}-#{$i} {
44
- @include make-col($i, $columns);
52
+ @if $columns > 0 {
53
+ @for $i from 1 through $columns {
54
+ .col#{$infix}-#{$i} {
55
+ @include make-col($i, $columns);
56
+ }
45
57
  }
46
58
  }
47
59
 
@@ -53,11 +65,13 @@
53
65
  .order#{$infix}-#{$i} { order: $i; }
54
66
  }
55
67
 
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);
68
+ @if $columns > 0 {
69
+ // `$columns - 1` because offsetting by the width of an entire row isn't possible
70
+ @for $i from 0 through ($columns - 1) {
71
+ @if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0
72
+ .offset#{$infix}-#{$i} {
73
+ @include make-col-offset($i, $columns);
74
+ }
61
75
  }
62
76
  }
63
77
  }