bootstrap 4.3.1 → 4.6.2.1

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 (96) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +15 -1
  3. data/CHANGELOG.md +4 -12
  4. data/README.md +7 -1
  5. data/Rakefile +16 -4
  6. data/assets/javascripts/bootstrap/alert.js +43 -55
  7. data/assets/javascripts/bootstrap/button.js +112 -70
  8. data/assets/javascripts/bootstrap/carousel.js +164 -189
  9. data/assets/javascripts/bootstrap/collapse.js +98 -129
  10. data/assets/javascripts/bootstrap/dropdown.js +165 -200
  11. data/assets/javascripts/bootstrap/modal.js +218 -205
  12. data/assets/javascripts/bootstrap/popover.js +63 -79
  13. data/assets/javascripts/bootstrap/scrollspy.js +82 -119
  14. data/assets/javascripts/bootstrap/tab.js +79 -85
  15. data/assets/javascripts/bootstrap/toast.js +100 -115
  16. data/assets/javascripts/bootstrap/tooltip.js +207 -225
  17. data/assets/javascripts/bootstrap/util.js +41 -23
  18. data/assets/javascripts/bootstrap.js +1235 -1314
  19. data/assets/javascripts/bootstrap.min.js +4 -4
  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 +47 -50
  29. data/assets/stylesheets/bootstrap/_carousel.scss +12 -9
  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 +43 -24
  33. data/assets/stylesheets/bootstrap/_dropdown.scss +7 -6
  34. data/assets/stylesheets/bootstrap/_forms.scss +30 -13
  35. data/assets/stylesheets/bootstrap/_functions.scss +110 -6
  36. data/assets/stylesheets/bootstrap/_grid.scss +32 -11
  37. data/assets/stylesheets/bootstrap/_images.scss +3 -3
  38. data/assets/stylesheets/bootstrap/_input-group.scss +23 -5
  39. data/assets/stylesheets/bootstrap/_jumbotron.scss +1 -1
  40. data/assets/stylesheets/bootstrap/_list-group.scss +36 -31
  41. data/assets/stylesheets/bootstrap/_mixins.scss +3 -3
  42. data/assets/stylesheets/bootstrap/_modal.scss +26 -15
  43. data/assets/stylesheets/bootstrap/_nav.scss +12 -7
  44. data/assets/stylesheets/bootstrap/_navbar.scss +55 -17
  45. data/assets/stylesheets/bootstrap/_pagination.scss +5 -4
  46. data/assets/stylesheets/bootstrap/_popover.scss +17 -18
  47. data/assets/stylesheets/bootstrap/_print.scss +1 -10
  48. data/assets/stylesheets/bootstrap/_progress.scss +7 -3
  49. data/assets/stylesheets/bootstrap/_reboot.scss +39 -38
  50. data/assets/stylesheets/bootstrap/_spinners.scss +18 -8
  51. data/assets/stylesheets/bootstrap/_tables.scss +3 -3
  52. data/assets/stylesheets/bootstrap/_toasts.scss +4 -2
  53. data/assets/stylesheets/bootstrap/_tooltip.scss +4 -4
  54. data/assets/stylesheets/bootstrap/_transitions.scss +6 -0
  55. data/assets/stylesheets/bootstrap/_type.scss +3 -3
  56. data/assets/stylesheets/bootstrap/_utilities.scss +2 -1
  57. data/assets/stylesheets/bootstrap/_variables.scss +71 -45
  58. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +5 -3
  59. data/assets/stylesheets/bootstrap/mixins/_badge.scss +1 -1
  60. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +27 -14
  61. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +11 -8
  62. data/assets/stylesheets/bootstrap/mixins/_caret.scss +8 -8
  63. data/assets/stylesheets/bootstrap/mixins/_float.scss +3 -3
  64. data/assets/stylesheets/bootstrap/mixins/_forms.scss +52 -49
  65. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +31 -17
  66. data/assets/stylesheets/bootstrap/mixins/_grid.scss +32 -14
  67. data/assets/stylesheets/bootstrap/mixins/_hover.scss +4 -4
  68. data/assets/stylesheets/bootstrap/mixins/_image.scss +2 -2
  69. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +1 -1
  70. data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
  71. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +2 -1
  72. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
  73. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +5 -4
  74. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +1 -1
  75. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +3 -2
  76. data/assets/stylesheets/bootstrap/mixins/_transition.scss +18 -8
  77. data/assets/stylesheets/bootstrap/utilities/_background.scss +2 -2
  78. data/assets/stylesheets/bootstrap/utilities/_borders.scss +1 -1
  79. data/assets/stylesheets/bootstrap/utilities/_embed.scss +1 -1
  80. data/assets/stylesheets/bootstrap/utilities/_interactions.scss +5 -0
  81. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +1 -1
  82. data/assets/stylesheets/bootstrap/utilities/_text.scss +4 -4
  83. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +126 -102
  84. data/bootstrap.gemspec +2 -4
  85. data/lib/bootstrap/engine.rb +17 -1
  86. data/lib/bootstrap/version.rb +2 -2
  87. data/tasks/updater/js.rb +18 -6
  88. data/tasks/updater/network.rb +8 -2
  89. data/test/dummy_rails/app/assets/config/manifest.js +3 -0
  90. data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
  91. data/test/gemfiles/rails_6_0.gemfile +7 -0
  92. data/test/gemfiles/rails_7_0_dartsass.gemfile +8 -0
  93. data/test/gemfiles/rails_7_0_sassc.gemfile +8 -0
  94. data/test/support/dummy_rails_integration.rb +3 -1
  95. data/test/test_helper.rb +18 -13
  96. metadata +17 -21
@@ -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 * .5;
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
- padding-right: $input-height-inner;
60
- background-image: $icon;
88
+ padding-right: $input-height-inner !important; // stylelint-disable-line declaration-no-important
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,22 @@
67
96
  border-color: $color;
68
97
  box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
69
98
  }
99
+ }
100
+ }
70
101
 
71
- ~ .#{$state}-feedback,
72
- ~ .#{$state}-tooltip {
73
- display: block;
102
+ // stylelint-disable-next-line selector-no-qualifying-type
103
+ select.form-control {
104
+ @include form-validation-state-selector($state) {
105
+ @if $enable-validation-icons {
106
+ padding-right: $input-padding-x * 4 !important; // stylelint-disable-line declaration-no-important
107
+ background-position: right $input-padding-x * 2 center;
74
108
  }
75
109
  }
76
110
  }
77
111
 
78
112
  // stylelint-disable-next-line selector-no-qualifying-type
79
113
  textarea.form-control {
80
- .was-validated &:#{$state},
81
- &.is-#{$state} {
114
+ @include form-validation-state-selector($state) {
82
115
  @if $enable-validation-icons {
83
116
  padding-right: $input-height-inner;
84
117
  background-position: top $input-height-inner-quarter right $input-height-inner-quarter;
@@ -87,41 +120,23 @@
87
120
  }
88
121
 
89
122
  .custom-select {
90
- .was-validated &:#{$state},
91
- &.is-#{$state} {
123
+ @include form-validation-state-selector($state) {
92
124
  border-color: $color;
93
125
 
94
126
  @if $enable-validation-icons {
95
- 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;
127
+ padding-right: $custom-select-feedback-icon-padding-right !important; // stylelint-disable-line declaration-no-important
128
+ background: $custom-select-background, $custom-select-bg escape-svg($icon) $custom-select-feedback-icon-position / $custom-select-feedback-icon-size no-repeat;
97
129
  }
98
130
 
99
131
  &:focus {
100
132
  border-color: $color;
101
133
  box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
102
134
  }
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
135
  }
120
136
  }
121
137
 
122
138
  .form-check-input {
123
- .was-validated &:#{$state},
124
- &.is-#{$state} {
139
+ @include form-validation-state-selector($state) {
125
140
  ~ .form-check-label {
126
141
  color: $color;
127
142
  }
@@ -134,8 +149,7 @@
134
149
  }
135
150
 
136
151
  .custom-control-input {
137
- .was-validated &:#{$state},
138
- &.is-#{$state} {
152
+ @include form-validation-state-selector($state) {
139
153
  ~ .custom-control-label {
140
154
  color: $color;
141
155
 
@@ -144,11 +158,6 @@
144
158
  }
145
159
  }
146
160
 
147
- ~ .#{$state}-feedback,
148
- ~ .#{$state}-tooltip {
149
- display: block;
150
- }
151
-
152
161
  &:checked {
153
162
  ~ .custom-control-label::before {
154
163
  border-color: lighten($color, 10%);
@@ -170,17 +179,11 @@
170
179
 
171
180
  // custom file
172
181
  .custom-file-input {
173
- .was-validated &:#{$state},
174
- &.is-#{$state} {
182
+ @include form-validation-state-selector($state) {
175
183
  ~ .custom-file-label {
176
184
  border-color: $color;
177
185
  }
178
186
 
179
- ~ .#{$state}-feedback,
180
- ~ .#{$state}-tooltip {
181
- display: block;
182
- }
183
-
184
187
  &:focus {
185
188
  ~ .custom-file-label {
186
189
  border-color: $color;
@@ -8,19 +8,22 @@
8
8
  %grid-column {
9
9
  position: relative;
10
10
  width: 100%;
11
- padding-right: $gutter / 2;
12
- padding-left: $gutter / 2;
11
+ padding-right: $gutter * .5;
12
+ padding-left: $gutter * .5;
13
13
  }
14
14
 
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
  }
@@ -4,12 +4,18 @@
4
4
 
5
5
  @mixin make-container($gutter: $grid-gutter-width) {
6
6
  width: 100%;
7
- padding-right: $gutter / 2;
8
- padding-left: $gutter / 2;
7
+ padding-right: $gutter * .5;
8
+ padding-left: $gutter * .5;
9
9
  margin-right: auto;
10
10
  margin-left: auto;
11
11
  }
12
12
 
13
+ @mixin make-row($gutter: $grid-gutter-width) {
14
+ display: flex;
15
+ flex-wrap: wrap;
16
+ margin-right: -$gutter * .5;
17
+ margin-left: -$gutter * .5;
18
+ }
13
19
 
14
20
  // For each breakpoint, define the maximum width of the container in a media query
15
21
  @mixin make-container-max-widths($max-widths: $container-max-widths, $breakpoints: $grid-breakpoints) {
@@ -18,13 +24,7 @@
18
24
  max-width: $container-max-width;
19
25
  }
20
26
  }
21
- }
22
-
23
- @mixin make-row($gutter: $grid-gutter-width) {
24
- display: flex;
25
- flex-wrap: wrap;
26
- margin-right: -$gutter / 2;
27
- margin-left: -$gutter / 2;
27
+ @include deprecate("The `make-container-max-widths` mixin", "v4.5.2", "v5");
28
28
  }
29
29
 
30
30
  @mixin make-col-ready($gutter: $grid-gutter-width) {
@@ -33,19 +33,37 @@
33
33
  // always setting `width: 100%;`. This works because we use `flex` values
34
34
  // later on to override this initial width.
35
35
  width: 100%;
36
- padding-right: $gutter / 2;
37
- padding-left: $gutter / 2;
36
+ padding-right: $gutter * .5;
37
+ padding-left: $gutter * .5;
38
38
  }
39
39
 
40
40
  @mixin make-col($size, $columns: $grid-columns) {
41
- flex: 0 0 percentage($size / $columns);
41
+ flex: 0 0 percentage(divide($size, $columns));
42
42
  // Add a `max-width` to ensure content within each column does not blow out
43
43
  // the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
44
44
  // do not appear to require this.
45
- max-width: percentage($size / $columns);
45
+ max-width: percentage(divide($size, $columns));
46
+ }
47
+
48
+ @mixin make-col-auto() {
49
+ flex: 0 0 auto;
50
+ width: auto;
51
+ max-width: 100%; // Reset earlier grid tiers
46
52
  }
47
53
 
48
54
  @mixin make-col-offset($size, $columns: $grid-columns) {
49
- $num: $size / $columns;
55
+ $num: divide($size, $columns);
50
56
  margin-left: if($num == 0, 0, percentage($num));
51
57
  }
58
+
59
+ // Row columns
60
+ //
61
+ // Specify on a parent element(e.g., .row) to force immediate children into NN
62
+ // numberof columns. Supports wrapping to new lines, but does not do a Masonry
63
+ // style grid.
64
+ @mixin row-cols($count) {
65
+ > * {
66
+ flex: 0 0 divide(100%, $count);
67
+ max-width: divide(100%, $count);
68
+ }
69
+ }
@@ -9,18 +9,18 @@
9
9
  //
10
10
  // Issue: https://github.com/twbs/bootstrap/issues/25195
11
11
 
12
- @mixin hover {
12
+ @mixin hover() {
13
13
  &:hover { @content; }
14
14
  }
15
15
 
16
- @mixin hover-focus {
16
+ @mixin hover-focus() {
17
17
  &:hover,
18
18
  &:focus {
19
19
  @content;
20
20
  }
21
21
  }
22
22
 
23
- @mixin plain-hover-focus {
23
+ @mixin plain-hover-focus() {
24
24
  &,
25
25
  &:hover,
26
26
  &:focus {
@@ -28,7 +28,7 @@
28
28
  }
29
29
  }
30
30
 
31
- @mixin hover-focus-active {
31
+ @mixin hover-focus-active() {
32
32
  &:hover,
33
33
  &:focus,
34
34
  &:active {
@@ -7,7 +7,7 @@
7
7
  //
8
8
  // Keep images from scaling beyond the width of their parents.
9
9
 
10
- @mixin img-fluid {
10
+ @mixin img-fluid() {
11
11
  // Part 1: Set a maximum relative to the parent
12
12
  max-width: 100%;
13
13
  // Part 2: Override the height to auto, otherwise images will be stretched
@@ -26,7 +26,7 @@
26
26
  // Autoprefixer takes care of adding -webkit-min-device-pixel-ratio and -o-min-device-pixel-ratio,
27
27
  // but doesn't convert dppx=>dpi.
28
28
  // There's no such thing as unprefixed min-device-pixel-ratio since it's nonstandard.
29
- // Compatibility info: https://caniuse.com/#feat=css-media-resolution
29
+ // Compatibility info: https://caniuse.com/css-media-resolution
30
30
  @media only screen and (min-resolution: 192dpi), // IE9-11 don't support dppx
31
31
  only screen and (min-resolution: 2dppx) { // Standardized
32
32
  background-image: url($file-2x);
@@ -6,7 +6,7 @@
6
6
  background-color: $background;
7
7
 
8
8
  &.list-group-item-action {
9
- @include hover-focus {
9
+ @include hover-focus() {
10
10
  color: $color;
11
11
  background-color: darken($background, 5%);
12
12
  }
@@ -1,7 +1,7 @@
1
1
  // Lists
2
2
 
3
3
  // Unstyled keeps list items block level, just removes default browser padding and list-style
4
- @mixin list-unstyled {
4
+ @mixin list-unstyled() {
5
5
  padding-left: 0;
6
6
  list-style: none;
7
7
  }
@@ -2,9 +2,10 @@
2
2
  //
3
3
  // Dividers (basically an hr) within dropdowns and nav lists
4
4
 
5
- @mixin nav-divider($color: $nav-divider-color, $margin-y: $nav-divider-margin-y) {
5
+ @mixin nav-divider($color: $nav-divider-color, $margin-y: $nav-divider-margin-y, $ignore-warning: false) {
6
6
  height: 0;
7
7
  margin: $margin-y 0;
8
8
  overflow: hidden;
9
9
  border-top: 1px solid $color;
10
+ @include deprecate("The `nav-divider()` mixin", "v4.4.0", "v5", $ignore-warning);
10
11
  }
@@ -1,4 +1,4 @@
1
- @mixin reset-text {
1
+ @mixin reset-text() {
2
2
  font-family: $font-family-base;
3
3
  // We deliberately do NOT reset font-size or word-wrap.
4
4
  font-style: normal;
@@ -11,7 +11,7 @@
11
11
  text-transform: none;
12
12
  letter-spacing: normal;
13
13
  word-break: normal;
14
- word-spacing: normal;
15
14
  white-space: normal;
15
+ word-spacing: normal;
16
16
  line-break: auto;
17
17
  }
@@ -1,13 +1,14 @@
1
1
  // Only display content to screen readers
2
2
  //
3
- // See: https://a11yproject.com/posts/how-to-hide-content/
4
- // See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/
3
+ // See: https://www.a11yproject.com/posts/2013-01-11-how-to-hide-content/
4
+ // See: https://kittygiraudel.com/2016/10/13/css-hide-and-seek/
5
5
 
6
- @mixin sr-only {
6
+ @mixin sr-only() {
7
7
  position: absolute;
8
8
  width: 1px;
9
9
  height: 1px;
10
10
  padding: 0;
11
+ margin: -1px; // Fix for https://github.com/twbs/bootstrap/issues/25686
11
12
  overflow: hidden;
12
13
  clip: rect(0, 0, 0, 0);
13
14
  white-space: nowrap;
@@ -20,7 +21,7 @@
20
21
  //
21
22
  // Credit: HTML5 Boilerplate
22
23
 
23
- @mixin sr-only-focusable {
24
+ @mixin sr-only-focusable() {
24
25
  &:active,
25
26
  &:focus {
26
27
  position: static;
@@ -26,7 +26,7 @@
26
26
  $hover-background: darken($background, 5%);
27
27
 
28
28
  .table-#{$state} {
29
- @include hover {
29
+ @include hover() {
30
30
  background-color: $hover-background;
31
31
 
32
32
  > td,
@@ -2,15 +2,16 @@
2
2
 
3
3
  // Typography
4
4
 
5
- @mixin text-emphasis-variant($parent, $color) {
5
+ @mixin text-emphasis-variant($parent, $color, $ignore-warning: false) {
6
6
  #{$parent} {
7
7
  color: $color !important;
8
8
  }
9
9
  @if $emphasized-link-hover-darken-percentage != 0 {
10
10
  a#{$parent} {
11
- @include hover-focus {
11
+ @include hover-focus() {
12
12
  color: darken($color, $emphasized-link-hover-darken-percentage) !important;
13
13
  }
14
14
  }
15
15
  }
16
+ @include deprecate("`text-emphasis-variant()`", "v4.4.0", "v5", $ignore-warning);
16
17
  }
@@ -1,16 +1,26 @@
1
- // stylelint-disable property-blacklist
1
+ // stylelint-disable property-disallowed-list
2
2
  @mixin transition($transition...) {
3
+ @if length($transition) == 0 {
4
+ $transition: $transition-base;
5
+ }
6
+
7
+ @if length($transition) > 1 {
8
+ @each $value in $transition {
9
+ @if $value == null or $value == none {
10
+ @warn "The keyword 'none' or 'null' must be used as a single argument.";
11
+ }
12
+ }
13
+ }
14
+
3
15
  @if $enable-transitions {
4
- @if length($transition) == 0 {
5
- transition: $transition-base;
6
- } @else {
16
+ @if nth($transition, 1) != null {
7
17
  transition: $transition;
8
18
  }
9
- }
10
19
 
11
- @if $enable-prefers-reduced-motion-media-query {
12
- @media (prefers-reduced-motion: reduce) {
13
- transition: none;
20
+ @if $enable-prefers-reduced-motion-media-query and nth($transition, 1) != null and nth($transition, 1) != none {
21
+ @media (prefers-reduced-motion: reduce) {
22
+ transition: none;
23
+ }
14
24
  }
15
25
  }
16
26
  }