bootstrap 4.3.1 → 4.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) 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/alert.js +26 -35
  6. data/assets/javascripts/bootstrap/button.js +93 -52
  7. data/assets/javascripts/bootstrap/carousel.js +122 -120
  8. data/assets/javascripts/bootstrap/collapse.js +75 -71
  9. data/assets/javascripts/bootstrap/dropdown.js +143 -140
  10. data/assets/javascripts/bootstrap/modal.js +165 -134
  11. data/assets/javascripts/bootstrap/popover.js +47 -39
  12. data/assets/javascripts/bootstrap/scrollspy.js +71 -71
  13. data/assets/javascripts/bootstrap/tab.js +51 -60
  14. data/assets/javascripts/bootstrap/toast.js +84 -72
  15. data/assets/javascripts/bootstrap/tooltip.js +141 -131
  16. data/assets/javascripts/bootstrap/util.js +28 -7
  17. data/assets/javascripts/bootstrap-sprockets.js +6 -6
  18. data/assets/javascripts/bootstrap.js +811 -826
  19. data/assets/javascripts/bootstrap.min.js +3 -3
  20. data/assets/stylesheets/_bootstrap-grid.scss +3 -3
  21. data/assets/stylesheets/_bootstrap-reboot.scss +3 -3
  22. data/assets/stylesheets/_bootstrap.scss +3 -3
  23. data/assets/stylesheets/bootstrap/_badge.scss +1 -1
  24. data/assets/stylesheets/bootstrap/_breadcrumb.scss +4 -1
  25. data/assets/stylesheets/bootstrap/_button-group.scss +1 -1
  26. data/assets/stylesheets/bootstrap/_buttons.scss +13 -8
  27. data/assets/stylesheets/bootstrap/_card.scss +28 -35
  28. data/assets/stylesheets/bootstrap/_carousel.scss +6 -6
  29. data/assets/stylesheets/bootstrap/_close.scss +2 -3
  30. data/assets/stylesheets/bootstrap/_code.scss +1 -1
  31. data/assets/stylesheets/bootstrap/_custom-forms.scss +24 -9
  32. data/assets/stylesheets/bootstrap/_dropdown.scss +5 -4
  33. data/assets/stylesheets/bootstrap/_forms.scss +26 -9
  34. data/assets/stylesheets/bootstrap/_functions.scss +60 -5
  35. data/assets/stylesheets/bootstrap/_grid.scss +33 -8
  36. data/assets/stylesheets/bootstrap/_images.scss +2 -2
  37. data/assets/stylesheets/bootstrap/_input-group.scss +1 -2
  38. data/assets/stylesheets/bootstrap/_list-group.scss +36 -31
  39. data/assets/stylesheets/bootstrap/_mixins.scss +3 -3
  40. data/assets/stylesheets/bootstrap/_modal.scss +28 -16
  41. data/assets/stylesheets/bootstrap/_nav.scss +4 -3
  42. data/assets/stylesheets/bootstrap/_navbar.scss +45 -15
  43. data/assets/stylesheets/bootstrap/_pagination.scss +3 -2
  44. data/assets/stylesheets/bootstrap/_popover.scss +8 -9
  45. data/assets/stylesheets/bootstrap/_print.scss +2 -2
  46. data/assets/stylesheets/bootstrap/_progress.scss +6 -2
  47. data/assets/stylesheets/bootstrap/_reboot.scss +24 -27
  48. data/assets/stylesheets/bootstrap/_root.scss +1 -0
  49. data/assets/stylesheets/bootstrap/_spinners.scss +1 -0
  50. data/assets/stylesheets/bootstrap/_tables.scss +3 -3
  51. data/assets/stylesheets/bootstrap/_type.scss +2 -2
  52. data/assets/stylesheets/bootstrap/_utilities.scss +2 -1
  53. data/assets/stylesheets/bootstrap/_variables.scss +46 -22
  54. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +5 -3
  55. data/assets/stylesheets/bootstrap/mixins/_badge.scss +1 -1
  56. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +26 -13
  57. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +11 -8
  58. data/assets/stylesheets/bootstrap/mixins/_caret.scss +8 -8
  59. data/assets/stylesheets/bootstrap/mixins/_float.scss +3 -3
  60. data/assets/stylesheets/bootstrap/mixins/_forms.scss +34 -49
  61. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +30 -15
  62. data/assets/stylesheets/bootstrap/mixins/_grid.scss +18 -0
  63. data/assets/stylesheets/bootstrap/mixins/_hover.scss +4 -4
  64. data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -1
  65. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +1 -1
  66. data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
  67. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +2 -1
  68. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
  69. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +3 -2
  70. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +1 -1
  71. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +3 -2
  72. data/assets/stylesheets/bootstrap/mixins/_transition.scss +17 -7
  73. data/assets/stylesheets/bootstrap/utilities/_background.scss +2 -2
  74. data/assets/stylesheets/bootstrap/utilities/_interactions.scss +5 -0
  75. data/assets/stylesheets/bootstrap/utilities/_text.scss +3 -4
  76. data/bootstrap.gemspec +1 -1
  77. data/lib/bootstrap/version.rb +2 -2
  78. data/tasks/updater/network.rb +2 -2
  79. data/test/dummy_rails/app/assets/config/manifest.js +3 -0
  80. data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
  81. data/test/gemfiles/rails_6_0.gemfile +7 -0
  82. data/test/support/dummy_rails_integration.rb +3 -1
  83. data/test/test_helper.rb +18 -13
  84. metadata +11 -5
@@ -75,7 +75,7 @@
75
75
  .active.carousel-item-right {
76
76
  z-index: 0;
77
77
  opacity: 0;
78
- @include transition(0s $carousel-transition-duration opacity);
78
+ @include transition(opacity 0s $carousel-transition-duration);
79
79
  }
80
80
  }
81
81
 
@@ -101,7 +101,7 @@
101
101
  @include transition($carousel-control-transition);
102
102
 
103
103
  // Hover/focus state
104
- @include hover-focus {
104
+ @include hover-focus() {
105
105
  color: $carousel-control-color;
106
106
  text-decoration: none;
107
107
  outline: 0;
@@ -111,13 +111,13 @@
111
111
  .carousel-control-prev {
112
112
  left: 0;
113
113
  @if $enable-gradients {
114
- background: linear-gradient(90deg, rgba($black, .25), rgba($black, .001));
114
+ background-image: linear-gradient(90deg, rgba($black, .25), rgba($black, .001));
115
115
  }
116
116
  }
117
117
  .carousel-control-next {
118
118
  right: 0;
119
119
  @if $enable-gradients {
120
- background: linear-gradient(270deg, rgba($black, .25), rgba($black, .001));
120
+ background-image: linear-gradient(270deg, rgba($black, .25), rgba($black, .001));
121
121
  }
122
122
  }
123
123
 
@@ -130,10 +130,10 @@
130
130
  background: no-repeat 50% / 100% 100%;
131
131
  }
132
132
  .carousel-control-prev-icon {
133
- background-image: $carousel-control-prev-icon-bg;
133
+ background-image: escape-svg($carousel-control-prev-icon-bg);
134
134
  }
135
135
  .carousel-control-next-icon {
136
- background-image: $carousel-control-next-icon-bg;
136
+ background-image: escape-svg($carousel-control-next-icon-bg);
137
137
  }
138
138
 
139
139
 
@@ -8,13 +8,13 @@
8
8
  opacity: .5;
9
9
 
10
10
  // Override <a>'s hover style
11
- @include hover {
11
+ @include hover() {
12
12
  color: $close-color;
13
13
  text-decoration: none;
14
14
  }
15
15
 
16
16
  &:not(:disabled):not(.disabled) {
17
- @include hover-focus {
17
+ @include hover-focus() {
18
18
  opacity: .75;
19
19
  }
20
20
  }
@@ -30,7 +30,6 @@ button.close {
30
30
  padding: 0;
31
31
  background-color: transparent;
32
32
  border: 0;
33
- appearance: none;
34
33
  }
35
34
 
36
35
  // Future-proof disabling of clicks on `<a>` elements
@@ -2,7 +2,7 @@
2
2
  code {
3
3
  @include font-size($code-font-size);
4
4
  color: $code-color;
5
- word-break: break-word;
5
+ word-wrap: break-word;
6
6
 
7
7
  // Streamline the style when inside anchors to avoid broken underline and more
8
8
  a > & {
@@ -21,7 +21,10 @@
21
21
 
22
22
  .custom-control-input {
23
23
  position: absolute;
24
+ left: 0;
24
25
  z-index: -1; // Put the input behind the label so it doesn't overlay text
26
+ width: $custom-control-indicator-size;
27
+ height: ($font-size-base * $line-height-base + $custom-control-indicator-size) / 2;
25
28
  opacity: 0;
26
29
 
27
30
  &:checked ~ .custom-control-label::before {
@@ -51,6 +54,8 @@
51
54
  @include box-shadow($custom-control-indicator-active-box-shadow);
52
55
  }
53
56
 
57
+ // Use [disabled] and :disabled to work around https://github.com/twbs/bootstrap/issues/28247
58
+ &[disabled],
54
59
  &:disabled {
55
60
  ~ .custom-control-label {
56
61
  color: $custom-control-label-disabled-color;
@@ -69,7 +74,9 @@
69
74
  .custom-control-label {
70
75
  position: relative;
71
76
  margin-bottom: 0;
77
+ color: $custom-control-label-color;
72
78
  vertical-align: top;
79
+ cursor: $custom-control-cursor;
73
80
 
74
81
  // Background-color and (when enabled) gradient
75
82
  &::before {
@@ -111,7 +118,7 @@
111
118
 
112
119
  .custom-control-input:checked ~ .custom-control-label {
113
120
  &::after {
114
- background-image: $custom-checkbox-indicator-icon-checked;
121
+ background-image: escape-svg($custom-checkbox-indicator-icon-checked);
115
122
  }
116
123
  }
117
124
 
@@ -122,7 +129,7 @@
122
129
  @include box-shadow($custom-checkbox-indicator-indeterminate-box-shadow);
123
130
  }
124
131
  &::after {
125
- background-image: $custom-checkbox-indicator-icon-indeterminate;
132
+ background-image: escape-svg($custom-checkbox-indicator-icon-indeterminate);
126
133
  }
127
134
  }
128
135
 
@@ -148,7 +155,7 @@
148
155
 
149
156
  .custom-control-input:checked ~ .custom-control-label {
150
157
  &::after {
151
- background-image: $custom-radio-indicator-icon-checked;
158
+ background-image: escape-svg($custom-radio-indicator-icon-checked);
152
159
  }
153
160
  }
154
161
 
@@ -177,8 +184,8 @@
177
184
  }
178
185
 
179
186
  &::after {
180
- top: calc(#{(($font-size-base * $line-height-base - $custom-control-indicator-size) / 2)} + #{$custom-control-indicator-border-width * 2});
181
- left: calc(#{-($custom-switch-width + $custom-control-gutter)} + #{$custom-control-indicator-border-width * 2});
187
+ top: add(($font-size-base * $line-height-base - $custom-control-indicator-size) / 2, $custom-control-indicator-border-width * 2);
188
+ left: add(-($custom-switch-width + $custom-control-gutter), $custom-control-indicator-border-width * 2);
182
189
  width: $custom-switch-indicator-size;
183
190
  height: $custom-switch-indicator-size;
184
191
  background-color: $custom-control-indicator-border-color;
@@ -220,8 +227,7 @@
220
227
  line-height: $custom-select-line-height;
221
228
  color: $custom-select-color;
222
229
  vertical-align: middle;
223
- background: $custom-select-background;
224
- background-color: $custom-select-bg;
230
+ background: $custom-select-bg $custom-select-background;
225
231
  border: $custom-select-border-width solid $custom-select-border-color;
226
232
  @include border-radius($custom-select-border-radius, 0);
227
233
  @include box-shadow($custom-select-box-shadow);
@@ -231,8 +237,9 @@
231
237
  border-color: $custom-select-focus-border-color;
232
238
  outline: 0;
233
239
  @if $enable-shadows {
234
- box-shadow: $custom-select-box-shadow, $custom-select-focus-box-shadow;
240
+ @include box-shadow($custom-select-box-shadow, $custom-select-focus-box-shadow);
235
241
  } @else {
242
+ // Avoid using mixin so we can pass custom focus shadow properly
236
243
  box-shadow: $custom-select-focus-box-shadow;
237
244
  }
238
245
 
@@ -263,6 +270,12 @@
263
270
  &::-ms-expand {
264
271
  display: none;
265
272
  }
273
+
274
+ // Remove outline from select box in FF
275
+ &:-moz-focusring {
276
+ color: transparent;
277
+ text-shadow: 0 0 0 $custom-select-color;
278
+ }
266
279
  }
267
280
 
268
281
  .custom-select-sm {
@@ -307,6 +320,8 @@
307
320
  box-shadow: $custom-file-focus-box-shadow;
308
321
  }
309
322
 
323
+ // Use [disabled] and :disabled to work around https://github.com/twbs/bootstrap/issues/28247
324
+ &[disabled] ~ .custom-file-label,
310
325
  &:disabled ~ .custom-file-label {
311
326
  background-color: $custom-file-disabled-bg;
312
327
  }
@@ -365,7 +380,7 @@
365
380
 
366
381
  .custom-range {
367
382
  width: 100%;
368
- height: calc(#{$custom-range-thumb-height} + #{$custom-range-thumb-focus-box-shadow-width * 2});
383
+ height: add($custom-range-thumb-height, $custom-range-thumb-focus-box-shadow-width * 2);
369
384
  padding: 0; // Need to reset padding
370
385
  background-color: transparent;
371
386
  appearance: none;
@@ -10,7 +10,7 @@
10
10
  white-space: nowrap;
11
11
 
12
12
  // Generate the caret automatically
13
- @include caret;
13
+ @include caret();
14
14
  }
15
15
 
16
16
  // The dropdown menu
@@ -114,7 +114,7 @@
114
114
 
115
115
  // Dividers (basically an `<hr>`) within the dropdown
116
116
  .dropdown-divider {
117
- @include nav-divider($dropdown-divider-bg, $dropdown-divider-margin-y);
117
+ @include nav-divider($dropdown-divider-bg, $dropdown-divider-margin-y, true);
118
118
  }
119
119
 
120
120
  // Links, buttons, and more within the dropdown menu
@@ -128,6 +128,7 @@
128
128
  font-weight: $font-weight-normal;
129
129
  color: $dropdown-link-color;
130
130
  text-align: inherit; // For `<button>`s
131
+ text-decoration: if($link-decoration == none, null, none);
131
132
  white-space: nowrap; // prevent links from randomly breaking onto new lines
132
133
  background-color: transparent; // For `<button>`s
133
134
  border: 0; // For `<button>`s
@@ -144,7 +145,7 @@
144
145
  }
145
146
  }
146
147
 
147
- @include hover-focus {
148
+ @include hover-focus() {
148
149
  color: $dropdown-link-hover-color;
149
150
  text-decoration: none;
150
151
  @include gradient-bg($dropdown-link-hover-bg);
@@ -176,7 +177,7 @@
176
177
  // Dropdown section headers
177
178
  .dropdown-header {
178
179
  display: block;
179
- padding: $dropdown-padding-y $dropdown-item-padding-x;
180
+ padding: $dropdown-header-padding;
180
181
  margin-bottom: 0; // for use with heading elements
181
182
  @include font-size($font-size-sm);
182
183
  color: $dropdown-header-color;
@@ -30,8 +30,14 @@
30
30
  border: 0;
31
31
  }
32
32
 
33
+ // Remove select outline from select box in FF
34
+ &:-moz-focusring {
35
+ color: transparent;
36
+ text-shadow: 0 0 0 $input-color;
37
+ }
38
+
33
39
  // Customize the `:focus` state to imitate native WebKit styles.
34
- @include form-control-focus();
40
+ @include form-control-focus($ignore-warning: true);
35
41
 
36
42
  // Placeholder
37
43
  &::placeholder {
@@ -53,6 +59,15 @@
53
59
  }
54
60
  }
55
61
 
62
+ input[type="date"],
63
+ input[type="time"],
64
+ input[type="datetime-local"],
65
+ input[type="month"] {
66
+ &.form-control {
67
+ appearance: none; // Fix appearance for date inputs in Safari
68
+ }
69
+ }
70
+
56
71
  select.form-control {
57
72
  &:focus::-ms-value {
58
73
  // Suppress the nested default white text on blue background highlight given to
@@ -80,23 +95,23 @@ select.form-control {
80
95
  // For use with horizontal and inline forms, when you need the label (or legend)
81
96
  // text to align with the form controls.
82
97
  .col-form-label {
83
- padding-top: calc(#{$input-padding-y} + #{$input-border-width});
84
- padding-bottom: calc(#{$input-padding-y} + #{$input-border-width});
98
+ padding-top: add($input-padding-y, $input-border-width);
99
+ padding-bottom: add($input-padding-y, $input-border-width);
85
100
  margin-bottom: 0; // Override the `<label>/<legend>` default
86
101
  @include font-size(inherit); // Override the `<legend>` default
87
102
  line-height: $input-line-height;
88
103
  }
89
104
 
90
105
  .col-form-label-lg {
91
- padding-top: calc(#{$input-padding-y-lg} + #{$input-border-width});
92
- padding-bottom: calc(#{$input-padding-y-lg} + #{$input-border-width});
106
+ padding-top: add($input-padding-y-lg, $input-border-width);
107
+ padding-bottom: add($input-padding-y-lg, $input-border-width);
93
108
  @include font-size($input-font-size-lg);
94
109
  line-height: $input-line-height-lg;
95
110
  }
96
111
 
97
112
  .col-form-label-sm {
98
- padding-top: calc(#{$input-padding-y-sm} + #{$input-border-width});
99
- padding-bottom: calc(#{$input-padding-y-sm} + #{$input-border-width});
113
+ padding-top: add($input-padding-y-sm, $input-border-width);
114
+ padding-bottom: add($input-padding-y-sm, $input-border-width);
100
115
  @include font-size($input-font-size-sm);
101
116
  line-height: $input-line-height-sm;
102
117
  }
@@ -110,9 +125,9 @@ select.form-control {
110
125
  .form-control-plaintext {
111
126
  display: block;
112
127
  width: 100%;
113
- padding-top: $input-padding-y;
114
- padding-bottom: $input-padding-y;
128
+ padding: $input-padding-y 0;
115
129
  margin-bottom: 0; // match inputs if this class comes on inputs with default margins
130
+ @include font-size($input-font-size);
116
131
  line-height: $input-line-height;
117
132
  color: $input-plaintext-color;
118
133
  background-color: transparent;
@@ -210,6 +225,8 @@ textarea.form-control {
210
225
  margin-top: $form-check-input-margin-y;
211
226
  margin-left: -$form-check-input-gutter;
212
227
 
228
+ // Use [disabled] and :disabled for workaround https://github.com/twbs/bootstrap/issues/28247
229
+ &[disabled] ~ .form-check-label,
213
230
  &:disabled ~ .form-check-label {
214
231
  color: $text-muted;
215
232
  }
@@ -8,7 +8,7 @@
8
8
  $prev-key: null;
9
9
  $prev-num: null;
10
10
  @each $key, $num in $map {
11
- @if $prev-num == null or unit($num) == "%" {
11
+ @if $prev-num == null or unit($num) == "%" or unit($prev-num) == "%" {
12
12
  // Do nothing
13
13
  } @else if not comparable($prev-num, $num) {
14
14
  @warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !";
@@ -23,10 +23,12 @@
23
23
  // Starts at zero
24
24
  // Used to ensure the min-width of the lowest breakpoint starts at 0.
25
25
  @mixin _assert-starts-at-zero($map, $map-name: "$grid-breakpoints") {
26
- $values: map-values($map);
27
- $first-value: nth($values, 1);
28
- @if $first-value != 0 {
29
- @warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}.";
26
+ @if length($map) > 0 {
27
+ $values: map-values($map);
28
+ $first-value: nth($values, 1);
29
+ @if $first-value != 0 {
30
+ @warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}.";
31
+ }
30
32
  }
31
33
  }
32
34
 
@@ -48,6 +50,22 @@
48
50
  @return $string;
49
51
  }
50
52
 
53
+ // See https://codepen.io/kevinweber/pen/dXWoRw
54
+ @function escape-svg($string) {
55
+ @if str-index($string, "data:image/svg+xml") {
56
+ @each $char, $encoded in $escaped-characters {
57
+ // Do not escape the url brackets
58
+ @if str-index($string, "url(") == 1 {
59
+ $string: url("#{str-replace(str-slice($string, 6, -3), $char, $encoded)}");
60
+ } @else {
61
+ $string: str-replace($string, $char, $encoded);
62
+ }
63
+ }
64
+ }
65
+
66
+ @return $string;
67
+ }
68
+
51
69
  // Color contrast
52
70
  @function color-yiq($color, $dark: $yiq-text-dark, $light: $yiq-text-light) {
53
71
  $r: red($color);
@@ -84,3 +102,40 @@
84
102
 
85
103
  @return mix($color-base, $color, $level * $theme-color-interval);
86
104
  }
105
+
106
+ // Return valid calc
107
+ @function add($value1, $value2, $return-calc: true) {
108
+ @if $value1 == null {
109
+ @return $value2;
110
+ }
111
+
112
+ @if $value2 == null {
113
+ @return $value1;
114
+ }
115
+
116
+ @if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
117
+ @return $value1 + $value2;
118
+ }
119
+
120
+ @return if($return-calc == true, calc(#{$value1} + #{$value2}), $value1 + unquote(" + ") + $value2);
121
+ }
122
+
123
+ @function subtract($value1, $value2, $return-calc: true) {
124
+ @if $value1 == null and $value2 == null {
125
+ @return null;
126
+ }
127
+
128
+ @if $value1 == null {
129
+ @return -$value2;
130
+ }
131
+
132
+ @if $value2 == null {
133
+ @return $value1;
134
+ }
135
+
136
+ @if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
137
+ @return $value1 - $value2;
138
+ }
139
+
140
+ @return if($return-calc == true, calc(#{$value1} - #{$value2}), $value1 + unquote(" - ") + $value2);
141
+ }
@@ -3,26 +3,51 @@
3
3
  // Set the container width, and override it for fixed navbars in media queries.
4
4
 
5
5
  @if $enable-grid-classes {
6
+ // Single container class with breakpoint max-widths
6
7
  .container {
7
8
  @include make-container();
8
9
  @include make-container-max-widths();
9
10
  }
10
- }
11
-
12
- // Fluid container
13
- //
14
- // Utilizes the mixin meant for fixed width containers, but with 100% width for
15
- // fluid, full width layouts.
16
11
 
17
- @if $enable-grid-classes {
12
+ // 100% wide container at all breakpoints
18
13
  .container-fluid {
19
14
  @include make-container();
20
15
  }
16
+
17
+ // Responsive containers that are 100% wide until a breakpoint
18
+ @each $breakpoint, $container-max-width in $container-max-widths {
19
+ .container-#{$breakpoint} {
20
+ @extend .container-fluid;
21
+ }
22
+
23
+ @include media-breakpoint-up($breakpoint, $grid-breakpoints) {
24
+ %responsive-container-#{$breakpoint} {
25
+ max-width: $container-max-width;
26
+ }
27
+
28
+ // Extend each breakpoint which is smaller or equal to the current breakpoint
29
+ $extend-breakpoint: true;
30
+
31
+ @each $name, $width in $grid-breakpoints {
32
+ @if ($extend-breakpoint) {
33
+ .container#{breakpoint-infix($name, $grid-breakpoints)} {
34
+ @extend %responsive-container-#{$breakpoint};
35
+ }
36
+
37
+ // Once the current breakpoint is reached, stop extending
38
+ @if ($breakpoint == $name) {
39
+ $extend-breakpoint: false;
40
+ }
41
+ }
42
+ }
43
+ }
44
+ }
21
45
  }
22
46
 
47
+
23
48
  // Row
24
49
  //
25
- // Rows contain and clear the floats of your columns.
50
+ // Rows contain your columns.
26
51
 
27
52
  @if $enable-grid-classes {
28
53
  .row {
@@ -6,7 +6,7 @@
6
6
  // which weren't expecting the images within themselves to be involuntarily resized.
7
7
  // See also https://github.com/twbs/bootstrap/issues/18178
8
8
  .img-fluid {
9
- @include img-fluid;
9
+ @include img-fluid();
10
10
  }
11
11
 
12
12
 
@@ -19,7 +19,7 @@
19
19
  @include box-shadow($thumbnail-box-shadow);
20
20
 
21
21
  // Keep them at most 100% wide
22
- @include img-fluid;
22
+ @include img-fluid();
23
23
  }
24
24
 
25
25
  //
@@ -17,9 +17,8 @@
17
17
  > .custom-file {
18
18
  position: relative; // For focus state's z-index
19
19
  flex: 1 1 auto;
20
- // Add width 1% and flex-basis auto to ensure that button will not wrap out
21
- // the column. Applies to IE Edge+ and Firefox. Chrome does not require this.
22
20
  width: 1%;
21
+ min-width: 0; // https://stackoverflow.com/questions/36247140/why-dont-flex-items-shrink-past-content-size
23
22
  margin-bottom: 0;
24
23
 
25
24
  + .form-control,
@@ -9,6 +9,7 @@
9
9
  // No need to set list-style: none; since .list-group-item is block level
10
10
  padding-left: 0; // reset padding because ul and ol
11
11
  margin-bottom: 0;
12
+ @include border-radius($list-group-border-radius);
12
13
  }
13
14
 
14
15
 
@@ -23,7 +24,7 @@
23
24
  text-align: inherit; // For `<button>`s (anchors inherit)
24
25
 
25
26
  // Hover state
26
- @include hover-focus {
27
+ @include hover-focus() {
27
28
  z-index: 1; // Place hover/focus items above their siblings for proper border styling
28
29
  color: $list-group-action-hover-color;
29
30
  text-decoration: none;
@@ -45,19 +46,17 @@
45
46
  position: relative;
46
47
  display: block;
47
48
  padding: $list-group-item-padding-y $list-group-item-padding-x;
48
- // Place the border on the list items and negative margin up for better styling
49
- margin-bottom: -$list-group-border-width;
50
49
  color: $list-group-color;
50
+ text-decoration: if($link-decoration == none, null, none);
51
51
  background-color: $list-group-bg;
52
52
  border: $list-group-border-width solid $list-group-border-color;
53
53
 
54
54
  &:first-child {
55
- @include border-top-radius($list-group-border-radius);
55
+ @include border-top-radius(inherit);
56
56
  }
57
57
 
58
58
  &:last-child {
59
- margin-bottom: 0;
60
- @include border-bottom-radius($list-group-border-radius);
59
+ @include border-bottom-radius(inherit);
61
60
  }
62
61
 
63
62
  &.disabled,
@@ -74,6 +73,15 @@
74
73
  background-color: $list-group-active-bg;
75
74
  border-color: $list-group-active-border-color;
76
75
  }
76
+
77
+ & + & {
78
+ border-top-width: 0;
79
+
80
+ &.active {
81
+ margin-top: -$list-group-border-width;
82
+ border-top-width: $list-group-border-width;
83
+ }
84
+ }
77
85
  }
78
86
 
79
87
 
@@ -88,20 +96,30 @@
88
96
  .list-group-horizontal#{$infix} {
89
97
  flex-direction: row;
90
98
 
91
- .list-group-item {
92
- margin-right: -$list-group-border-width;
93
- margin-bottom: 0;
94
-
99
+ > .list-group-item {
95
100
  &:first-child {
96
- @include border-left-radius($list-group-border-radius);
101
+ @include border-bottom-left-radius($list-group-border-radius);
97
102
  @include border-top-right-radius(0);
98
103
  }
99
104
 
100
105
  &:last-child {
101
- margin-right: 0;
102
- @include border-right-radius($list-group-border-radius);
106
+ @include border-top-right-radius($list-group-border-radius);
103
107
  @include border-bottom-left-radius(0);
104
108
  }
109
+
110
+ &.active {
111
+ margin-top: 0;
112
+ }
113
+
114
+ & + .list-group-item {
115
+ border-top-width: $list-group-border-width;
116
+ border-left-width: 0;
117
+
118
+ &.active {
119
+ margin-left: -$list-group-border-width;
120
+ border-left-width: $list-group-border-width;
121
+ }
122
+ }
105
123
  }
106
124
  }
107
125
  }
@@ -114,26 +132,13 @@
114
132
  // useful within other components (e.g., cards).
115
133
 
116
134
  .list-group-flush {
117
- .list-group-item {
118
- border-right: 0;
119
- border-left: 0;
120
- @include border-radius(0);
135
+ @include border-radius(0);
121
136
 
122
- &:last-child {
123
- margin-bottom: -$list-group-border-width;
124
- }
125
- }
137
+ > .list-group-item {
138
+ border-width: 0 0 $list-group-border-width;
126
139
 
127
- &:first-child {
128
- .list-group-item:first-child {
129
- border-top: 0;
130
- }
131
- }
132
-
133
- &:last-child {
134
- .list-group-item:last-child {
135
- margin-bottom: 0;
136
- border-bottom: 0;
140
+ &:last-child {
141
+ border-bottom-width: 0;
137
142
  }
138
143
  }
139
144
  }
@@ -22,7 +22,7 @@
22
22
  @import "mixins/text-truncate";
23
23
  @import "mixins/visibility";
24
24
 
25
- // // Components
25
+ // Components
26
26
  @import "mixins/alert";
27
27
  @import "mixins/buttons";
28
28
  @import "mixins/caret";
@@ -33,14 +33,14 @@
33
33
  @import "mixins/forms";
34
34
  @import "mixins/table-row";
35
35
 
36
- // // Skins
36
+ // Skins
37
37
  @import "mixins/background-variant";
38
38
  @import "mixins/border-radius";
39
39
  @import "mixins/box-shadow";
40
40
  @import "mixins/gradients";
41
41
  @import "mixins/transition";
42
42
 
43
- // // Layout
43
+ // Layout
44
44
  @import "mixins/clearfix";
45
45
  @import "mixins/grid-framework";
46
46
  @import "mixins/grid";