bootstrap 4.3.0 → 4.5.3

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.
Files changed (89) 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 +1186 -1056
  7. data/assets/javascripts/bootstrap.min.js +4 -4
  8. data/assets/javascripts/bootstrap/alert.js +45 -65
  9. data/assets/javascripts/bootstrap/button.js +114 -80
  10. data/assets/javascripts/bootstrap/carousel.js +131 -186
  11. data/assets/javascripts/bootstrap/collapse.js +86 -140
  12. data/assets/javascripts/bootstrap/dropdown.js +152 -207
  13. data/assets/javascripts/bootstrap/modal.js +204 -214
  14. data/assets/javascripts/bootstrap/popover.js +41 -95
  15. data/assets/javascripts/bootstrap/scrollspy.js +69 -127
  16. data/assets/javascripts/bootstrap/tab.js +75 -95
  17. data/assets/javascripts/bootstrap/toast.js +87 -127
  18. data/assets/javascripts/bootstrap/tooltip.js +298 -198
  19. data/assets/javascripts/bootstrap/util.js +41 -20
  20. data/assets/stylesheets/_bootstrap-grid.scss +4 -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 +4 -1
  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 +6 -6
  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 +34 -17
  33. data/assets/stylesheets/bootstrap/_dropdown.scss +6 -5
  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 +1 -2
  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 +6 -3
  43. data/assets/stylesheets/bootstrap/_navbar.scss +45 -15
  44. data/assets/stylesheets/bootstrap/_pagination.scss +3 -2
  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 +6 -2
  48. data/assets/stylesheets/bootstrap/_reboot.scss +32 -31
  49. data/assets/stylesheets/bootstrap/_root.scss +1 -0
  50. data/assets/stylesheets/bootstrap/_spinners.scss +3 -2
  51. data/assets/stylesheets/bootstrap/_tables.scss +3 -3
  52. data/assets/stylesheets/bootstrap/_toasts.scss +4 -2
  53. data/assets/stylesheets/bootstrap/_type.scss +2 -2
  54. data/assets/stylesheets/bootstrap/_utilities.scss +2 -1
  55. data/assets/stylesheets/bootstrap/_variables.scss +51 -32
  56. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +5 -3
  57. data/assets/stylesheets/bootstrap/mixins/_badge.scss +1 -1
  58. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +27 -14
  59. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +11 -8
  60. data/assets/stylesheets/bootstrap/mixins/_caret.scss +8 -8
  61. data/assets/stylesheets/bootstrap/mixins/_float.scss +3 -3
  62. data/assets/stylesheets/bootstrap/mixins/_forms.scss +35 -49
  63. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +29 -15
  64. data/assets/stylesheets/bootstrap/mixins/_grid.scss +25 -7
  65. data/assets/stylesheets/bootstrap/mixins/_hover.scss +4 -4
  66. data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -1
  67. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +1 -1
  68. data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
  69. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +2 -1
  70. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
  71. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +4 -3
  72. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +1 -1
  73. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +3 -2
  74. data/assets/stylesheets/bootstrap/mixins/_transition.scss +18 -8
  75. data/assets/stylesheets/bootstrap/utilities/_background.scss +2 -2
  76. data/assets/stylesheets/bootstrap/utilities/_borders.scss +1 -1
  77. data/assets/stylesheets/bootstrap/utilities/_interactions.scss +5 -0
  78. data/assets/stylesheets/bootstrap/utilities/_text.scss +4 -4
  79. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +0 -8
  80. data/bootstrap.gemspec +1 -1
  81. data/lib/bootstrap/version.rb +2 -2
  82. data/tasks/updater/js.rb +1 -1
  83. data/tasks/updater/network.rb +2 -2
  84. data/test/dummy_rails/app/assets/config/manifest.js +3 -0
  85. data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
  86. data/test/gemfiles/rails_6_0.gemfile +7 -0
  87. data/test/support/dummy_rails_integration.rb +3 -1
  88. data/test/test_helper.rb +18 -13
  89. 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
@@ -50,16 +66,22 @@
50
66
  @include border-radius($form-feedback-tooltip-border-radius);
51
67
  }
52
68
 
69
+ @include form-validation-state-selector($state) {
70
+ ~ .#{$state}-feedback,
71
+ ~ .#{$state}-tooltip {
72
+ display: block;
73
+ }
74
+ }
75
+
53
76
  .form-control {
54
- .was-validated &:#{$state},
55
- &.is-#{$state} {
77
+ @include form-validation-state-selector($state) {
56
78
  border-color: $color;
57
79
 
58
80
  @if $enable-validation-icons {
59
81
  padding-right: $input-height-inner;
60
- background-image: $icon;
82
+ background-image: escape-svg($icon);
61
83
  background-repeat: no-repeat;
62
- background-position: center right $input-height-inner-quarter;
84
+ background-position: right $input-height-inner-quarter center;
63
85
  background-size: $input-height-inner-half $input-height-inner-half;
64
86
  }
65
87
 
@@ -67,18 +89,12 @@
67
89
  border-color: $color;
68
90
  box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
69
91
  }
70
-
71
- ~ .#{$state}-feedback,
72
- ~ .#{$state}-tooltip {
73
- display: block;
74
- }
75
92
  }
76
93
  }
77
94
 
78
95
  // stylelint-disable-next-line selector-no-qualifying-type
79
96
  textarea.form-control {
80
- .was-validated &:#{$state},
81
- &.is-#{$state} {
97
+ @include form-validation-state-selector($state) {
82
98
  @if $enable-validation-icons {
83
99
  padding-right: $input-height-inner;
84
100
  background-position: top $input-height-inner-quarter right $input-height-inner-quarter;
@@ -87,41 +103,23 @@
87
103
  }
88
104
 
89
105
  .custom-select {
90
- .was-validated &:#{$state},
91
- &.is-#{$state} {
106
+ @include form-validation-state-selector($state) {
92
107
  border-color: $color;
93
108
 
94
109
  @if $enable-validation-icons {
95
110
  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;
111
+ background: $custom-select-background, escape-svg($icon) $custom-select-bg no-repeat $custom-select-feedback-icon-position / $custom-select-feedback-icon-size;
97
112
  }
98
113
 
99
114
  &:focus {
100
115
  border-color: $color;
101
116
  box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
102
117
  }
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
118
  }
120
119
  }
121
120
 
122
121
  .form-check-input {
123
- .was-validated &:#{$state},
124
- &.is-#{$state} {
122
+ @include form-validation-state-selector($state) {
125
123
  ~ .form-check-label {
126
124
  color: $color;
127
125
  }
@@ -134,8 +132,7 @@
134
132
  }
135
133
 
136
134
  .custom-control-input {
137
- .was-validated &:#{$state},
138
- &.is-#{$state} {
135
+ @include form-validation-state-selector($state) {
139
136
  ~ .custom-control-label {
140
137
  color: $color;
141
138
 
@@ -144,11 +141,6 @@
144
141
  }
145
142
  }
146
143
 
147
- ~ .#{$state}-feedback,
148
- ~ .#{$state}-tooltip {
149
- display: block;
150
- }
151
-
152
144
  &:checked {
153
145
  ~ .custom-control-label::before {
154
146
  border-color: lighten($color, 10%);
@@ -170,17 +162,11 @@
170
162
 
171
163
  // custom file
172
164
  .custom-file-input {
173
- .was-validated &:#{$state},
174
- &.is-#{$state} {
165
+ @include form-validation-state-selector($state) {
175
166
  ~ .custom-file-label {
176
167
  border-color: $color;
177
168
  }
178
169
 
179
- ~ .#{$state}-feedback,
180
- ~ .#{$state}-tooltip {
181
- display: block;
182
- }
183
-
184
170
  &:focus {
185
171
  ~ .custom-file-label {
186
172
  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
  }