bootstrap 4.2.1 → 4.3.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


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

Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/assets/javascripts/bootstrap-sprockets.js +5 -5
  4. data/assets/javascripts/bootstrap.js +133 -94
  5. data/assets/javascripts/bootstrap.min.js +3 -3
  6. data/assets/javascripts/bootstrap/alert.js +10 -10
  7. data/assets/javascripts/bootstrap/button.js +8 -8
  8. data/assets/javascripts/bootstrap/carousel.js +14 -12
  9. data/assets/javascripts/bootstrap/collapse.js +10 -10
  10. data/assets/javascripts/bootstrap/dropdown.js +22 -18
  11. data/assets/javascripts/bootstrap/modal.js +19 -13
  12. data/assets/javascripts/bootstrap/popover.js +10 -10
  13. data/assets/javascripts/bootstrap/scrollspy.js +10 -10
  14. data/assets/javascripts/bootstrap/tab.js +14 -11
  15. data/assets/javascripts/bootstrap/toast.js +15 -10
  16. data/assets/javascripts/bootstrap/tooltip.js +41 -26
  17. data/assets/javascripts/bootstrap/util.js +11 -7
  18. data/assets/stylesheets/_bootstrap-grid.scss +3 -3
  19. data/assets/stylesheets/_bootstrap-reboot.scss +3 -3
  20. data/assets/stylesheets/_bootstrap.scss +3 -3
  21. data/assets/stylesheets/bootstrap/_badge.scss +2 -1
  22. data/assets/stylesheets/bootstrap/_buttons.scss +2 -5
  23. data/assets/stylesheets/bootstrap/_card.scss +13 -34
  24. data/assets/stylesheets/bootstrap/_carousel.scss +1 -2
  25. data/assets/stylesheets/bootstrap/_close.scss +1 -4
  26. data/assets/stylesheets/bootstrap/_code.scss +5 -5
  27. data/assets/stylesheets/bootstrap/_custom-forms.scss +11 -11
  28. data/assets/stylesheets/bootstrap/_dropdown.scss +20 -20
  29. data/assets/stylesheets/bootstrap/_forms.scss +12 -16
  30. data/assets/stylesheets/bootstrap/_functions.scss +3 -3
  31. data/assets/stylesheets/bootstrap/_images.scss +1 -1
  32. data/assets/stylesheets/bootstrap/_input-group.scss +3 -3
  33. data/assets/stylesheets/bootstrap/_jumbotron.scss +1 -0
  34. data/assets/stylesheets/bootstrap/_list-group.scss +33 -5
  35. data/assets/stylesheets/bootstrap/_mixins.scss +6 -0
  36. data/assets/stylesheets/bootstrap/_modal.scss +47 -4
  37. data/assets/stylesheets/bootstrap/_navbar.scss +3 -8
  38. data/assets/stylesheets/bootstrap/_pagination.scss +0 -5
  39. data/assets/stylesheets/bootstrap/_popover.scss +46 -58
  40. data/assets/stylesheets/bootstrap/_print.scss +1 -1
  41. data/assets/stylesheets/bootstrap/_progress.scss +15 -6
  42. data/assets/stylesheets/bootstrap/_reboot.scss +28 -7
  43. data/assets/stylesheets/bootstrap/_spinners.scss +2 -0
  44. data/assets/stylesheets/bootstrap/_tables.scss +3 -5
  45. data/assets/stylesheets/bootstrap/_toasts.scss +3 -2
  46. data/assets/stylesheets/bootstrap/_tooltip.scss +1 -1
  47. data/assets/stylesheets/bootstrap/_transitions.scss +0 -2
  48. data/assets/stylesheets/bootstrap/_type.scss +15 -15
  49. data/assets/stylesheets/bootstrap/_utilities.scss +1 -0
  50. data/assets/stylesheets/bootstrap/_variables.scss +129 -97
  51. data/assets/stylesheets/bootstrap/mixins/_badge.scss +6 -0
  52. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +29 -1
  53. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +16 -1
  54. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +3 -7
  55. data/assets/stylesheets/bootstrap/mixins/_caret.scss +4 -4
  56. data/assets/stylesheets/bootstrap/mixins/_deprecate.scss +10 -0
  57. data/assets/stylesheets/bootstrap/mixins/_float.scss +3 -0
  58. data/assets/stylesheets/bootstrap/mixins/_forms.scss +8 -14
  59. data/assets/stylesheets/bootstrap/mixins/_image.scss +2 -2
  60. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +1 -1
  61. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
  62. data/assets/stylesheets/bootstrap/mixins/_size.scss +1 -0
  63. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +5 -3
  64. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +1 -3
  65. data/assets/stylesheets/bootstrap/mixins/_transition.scss +1 -1
  66. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +1 -0
  67. data/assets/stylesheets/bootstrap/utilities/_borders.scss +13 -1
  68. data/assets/stylesheets/bootstrap/utilities/_display.scss +6 -18
  69. data/assets/stylesheets/bootstrap/utilities/_float.scss +5 -3
  70. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +19 -0
  71. data/assets/stylesheets/bootstrap/utilities/_text.scss +6 -1
  72. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +4 -2
  73. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +212 -0
  74. data/lib/bootstrap/version.rb +2 -2
  75. metadata +5 -2
@@ -2,6 +2,12 @@
2
2
  //
3
3
  // Used in conjunction with global variables to enable certain theme features.
4
4
 
5
+ // Vendor
6
+ @import "vendor/rfs";
7
+
8
+ // Deprecate
9
+ @import "mixins/deprecate";
10
+
5
11
  // Utilities
6
12
  @import "mixins/breakpoints";
7
13
  @import "mixins/hover";
@@ -50,17 +50,51 @@
50
50
  }
51
51
  }
52
52
 
53
+ .modal-dialog-scrollable {
54
+ display: flex; // IE10/11
55
+ max-height: calc(100% - #{$modal-dialog-margin * 2});
56
+
57
+ .modal-content {
58
+ max-height: calc(100vh - #{$modal-dialog-margin * 2}); // IE10/11
59
+ overflow: hidden;
60
+ }
61
+
62
+ .modal-header,
63
+ .modal-footer {
64
+ flex-shrink: 0;
65
+ }
66
+
67
+ .modal-body {
68
+ overflow-y: auto;
69
+ }
70
+ }
71
+
53
72
  .modal-dialog-centered {
54
73
  display: flex;
55
74
  align-items: center;
56
- min-height: calc(100% - (#{$modal-dialog-margin} * 2));
75
+ min-height: calc(100% - #{$modal-dialog-margin * 2});
57
76
 
58
77
  // Ensure `modal-dialog-centered` extends the full height of the view (IE10/11)
59
78
  &::before {
60
79
  display: block; // IE10
61
- height: calc(100vh - (#{$modal-dialog-margin} * 2));
80
+ height: calc(100vh - #{$modal-dialog-margin * 2});
62
81
  content: "";
63
82
  }
83
+
84
+ // Ensure `.modal-body` shows scrollbar (IE10/11)
85
+ &.modal-dialog-scrollable {
86
+ flex-direction: column;
87
+ justify-content: center;
88
+ height: 100%;
89
+
90
+ .modal-content {
91
+ max-height: none;
92
+ }
93
+
94
+ &::before {
95
+ content: none;
96
+ }
97
+ }
64
98
  }
65
99
 
66
100
  // Actual modal
@@ -70,6 +104,7 @@
70
104
  flex-direction: column;
71
105
  width: 100%; // Ensure `.modal-content` extends the full width of the parent `.modal-dialog`
72
106
  // counteract the pointer-events: none; in the .modal-dialog
107
+ color: $modal-content-color;
73
108
  pointer-events: auto;
74
109
  background-color: $modal-content-bg;
75
110
  background-clip: padding-box;
@@ -159,11 +194,19 @@
159
194
  margin: $modal-dialog-margin-y-sm-up auto;
160
195
  }
161
196
 
197
+ .modal-dialog-scrollable {
198
+ max-height: calc(100% - #{$modal-dialog-margin-y-sm-up * 2});
199
+
200
+ .modal-content {
201
+ max-height: calc(100vh - #{$modal-dialog-margin-y-sm-up * 2});
202
+ }
203
+ }
204
+
162
205
  .modal-dialog-centered {
163
- min-height: calc(100% - (#{$modal-dialog-margin-y-sm-up} * 2));
206
+ min-height: calc(100% - #{$modal-dialog-margin-y-sm-up * 2});
164
207
 
165
208
  &::before {
166
- height: calc(100vh - (#{$modal-dialog-margin-y-sm-up} * 2));
209
+ height: calc(100vh - #{$modal-dialog-margin-y-sm-up * 2});
167
210
  }
168
211
  }
169
212
 
@@ -44,7 +44,7 @@
44
44
  padding-top: $navbar-brand-padding-y;
45
45
  padding-bottom: $navbar-brand-padding-y;
46
46
  margin-right: $navbar-padding-x;
47
- font-size: $navbar-brand-font-size;
47
+ @include font-size($navbar-brand-font-size);
48
48
  line-height: inherit;
49
49
  white-space: nowrap;
50
50
 
@@ -107,7 +107,7 @@
107
107
  // Button for toggling the navbar when in its collapsed state
108
108
  .navbar-toggler {
109
109
  padding: $navbar-toggler-padding-y $navbar-toggler-padding-x;
110
- font-size: $navbar-toggler-font-size;
110
+ @include font-size($navbar-toggler-font-size);
111
111
  line-height: 1;
112
112
  background-color: transparent; // remove default button style
113
113
  border: $border-width solid transparent; // remove default button style
@@ -116,11 +116,6 @@
116
116
  @include hover-focus {
117
117
  text-decoration: none;
118
118
  }
119
-
120
- // Opinionated: add "hand" cursor to non-disabled .navbar-toggler elements
121
- &:not(:disabled):not(.disabled) {
122
- cursor: pointer;
123
- }
124
119
  }
125
120
 
126
121
  // Keep as a separate element so folks can easily override it with another icon
@@ -175,7 +170,7 @@
175
170
  }
176
171
 
177
172
  .navbar-collapse {
178
- display: flex !important; // stylelint-disable-line declaration-no-important
173
+ display: flex !important; // stylelint-disable-line declaration-no-important
179
174
 
180
175
  // Changes flex-bases to auto because of an IE10 bug
181
176
  flex-basis: auto;
@@ -27,11 +27,6 @@
27
27
  outline: $pagination-focus-outline;
28
28
  box-shadow: $pagination-focus-box-shadow;
29
29
  }
30
-
31
- // Opinionated: add "hand" cursor to non-disabled .page-link elements
32
- &:not(:disabled):not(.disabled) {
33
- cursor: pointer;
34
- }
35
30
  }
36
31
 
37
32
  .page-item {
@@ -8,7 +8,7 @@
8
8
  // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
9
9
  // So reset our font and text properties to avoid inheriting weird values.
10
10
  @include reset-text();
11
- font-size: $popover-font-size;
11
+ @include font-size($popover-font-size);
12
12
  // Allow breaking very long words so they don't overflow the popover's bounds
13
13
  word-wrap: break-word;
14
14
  background-color: $popover-bg;
@@ -38,72 +38,63 @@
38
38
  .bs-popover-top {
39
39
  margin-bottom: $popover-arrow-height;
40
40
 
41
- .arrow {
41
+ > .arrow {
42
42
  bottom: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
43
- }
44
43
 
45
- .arrow::before,
46
- .arrow::after {
47
- border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
48
- }
49
-
50
- .arrow::before {
51
- bottom: 0;
52
- border-top-color: $popover-arrow-outer-color;
53
- }
44
+ &::before {
45
+ bottom: 0;
46
+ border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
47
+ border-top-color: $popover-arrow-outer-color;
48
+ }
54
49
 
55
- .arrow::after {
56
- bottom: $popover-border-width;
57
- border-top-color: $popover-arrow-color;
50
+ &::after {
51
+ bottom: $popover-border-width;
52
+ border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
53
+ border-top-color: $popover-arrow-color;
54
+ }
58
55
  }
59
56
  }
60
57
 
61
58
  .bs-popover-right {
62
59
  margin-left: $popover-arrow-height;
63
60
 
64
- .arrow {
61
+ > .arrow {
65
62
  left: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
66
63
  width: $popover-arrow-height;
67
64
  height: $popover-arrow-width;
68
65
  margin: $border-radius-lg 0; // make sure the arrow does not touch the popover's rounded corners
69
- }
70
-
71
- .arrow::before,
72
- .arrow::after {
73
- border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
74
- }
75
66
 
76
- .arrow::before {
77
- left: 0;
78
- border-right-color: $popover-arrow-outer-color;
79
- }
67
+ &::before {
68
+ left: 0;
69
+ border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
70
+ border-right-color: $popover-arrow-outer-color;
71
+ }
80
72
 
81
- .arrow::after {
82
- left: $popover-border-width;
83
- border-right-color: $popover-arrow-color;
73
+ &::after {
74
+ left: $popover-border-width;
75
+ border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
76
+ border-right-color: $popover-arrow-color;
77
+ }
84
78
  }
85
79
  }
86
80
 
87
81
  .bs-popover-bottom {
88
82
  margin-top: $popover-arrow-height;
89
83
 
90
- .arrow {
84
+ > .arrow {
91
85
  top: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
92
- }
93
-
94
- .arrow::before,
95
- .arrow::after {
96
- border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
97
- }
98
86
 
99
- .arrow::before {
100
- top: 0;
101
- border-bottom-color: $popover-arrow-outer-color;
102
- }
87
+ &::before {
88
+ top: 0;
89
+ border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
90
+ border-bottom-color: $popover-arrow-outer-color;
91
+ }
103
92
 
104
- .arrow::after {
105
- top: $popover-border-width;
106
- border-bottom-color: $popover-arrow-color;
93
+ &::after {
94
+ top: $popover-border-width;
95
+ border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
96
+ border-bottom-color: $popover-arrow-color;
97
+ }
107
98
  }
108
99
 
109
100
  // This will remove the popover-header's border just below the arrow
@@ -122,26 +113,23 @@
122
113
  .bs-popover-left {
123
114
  margin-right: $popover-arrow-height;
124
115
 
125
- .arrow {
116
+ > .arrow {
126
117
  right: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
127
118
  width: $popover-arrow-height;
128
119
  height: $popover-arrow-width;
129
120
  margin: $border-radius-lg 0; // make sure the arrow does not touch the popover's rounded corners
130
- }
131
-
132
- .arrow::before,
133
- .arrow::after {
134
- border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
135
- }
136
121
 
137
- .arrow::before {
138
- right: 0;
139
- border-left-color: $popover-arrow-outer-color;
140
- }
122
+ &::before {
123
+ right: 0;
124
+ border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
125
+ border-left-color: $popover-arrow-outer-color;
126
+ }
141
127
 
142
- .arrow::after {
143
- right: $popover-border-width;
144
- border-left-color: $popover-arrow-color;
128
+ &::after {
129
+ right: $popover-border-width;
130
+ border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
131
+ border-left-color: $popover-arrow-color;
132
+ }
145
133
  }
146
134
  }
147
135
 
@@ -165,7 +153,7 @@
165
153
  .popover-header {
166
154
  padding: $popover-header-padding-y $popover-header-padding-x;
167
155
  margin-bottom: 0; // Reset the default from Reboot
168
- font-size: $font-size-base;
156
+ @include font-size($font-size-base);
169
157
  color: $popover-header-color;
170
158
  background-color: $popover-header-bg;
171
159
  border-bottom: $popover-border-width solid darken($popover-header-bg, 5%);
@@ -51,7 +51,7 @@
51
51
  }
52
52
  pre,
53
53
  blockquote {
54
- border: $border-width solid $gray-500; // Bootstrap custom code; using `$border-width` instead of 1px
54
+ border: $border-width solid $gray-500; // Bootstrap custom code; using `$border-width` instead of 1px
55
55
  page-break-inside: avoid;
56
56
  }
57
57
 
@@ -1,13 +1,16 @@
1
- @keyframes progress-bar-stripes {
2
- from { background-position: $progress-height 0; }
3
- to { background-position: 0 0; }
1
+ // Disable animation if transitions are disabled
2
+ @if $enable-transitions {
3
+ @keyframes progress-bar-stripes {
4
+ from { background-position: $progress-height 0; }
5
+ to { background-position: 0 0; }
6
+ }
4
7
  }
5
8
 
6
9
  .progress {
7
10
  display: flex;
8
11
  height: $progress-height;
9
12
  overflow: hidden; // force rounded corners by cropping it
10
- font-size: $progress-font-size;
13
+ @include font-size($progress-font-size);
11
14
  background-color: $progress-bg;
12
15
  @include border-radius($progress-border-radius);
13
16
  @include box-shadow($progress-box-shadow);
@@ -29,6 +32,12 @@
29
32
  background-size: $progress-height $progress-height;
30
33
  }
31
34
 
32
- .progress-bar-animated {
33
- animation: progress-bar-stripes $progress-bar-animation-timing;
35
+ @if $enable-transitions {
36
+ .progress-bar-animated {
37
+ animation: progress-bar-stripes $progress-bar-animation-timing;
38
+
39
+ @media (prefers-reduced-motion: reduce) {
40
+ animation: none;
41
+ }
42
+ }
34
43
  }
@@ -46,7 +46,7 @@ article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
46
46
  body {
47
47
  margin: 0; // 1
48
48
  font-family: $font-family-base;
49
- font-size: $font-size-base;
49
+ @include font-size($font-size-base);
50
50
  font-weight: $font-weight-base;
51
51
  line-height: $line-height-base;
52
52
  color: $body-color;
@@ -155,7 +155,7 @@ strong {
155
155
  }
156
156
 
157
157
  small {
158
- font-size: 80%; // Add the correct font size in all browsers
158
+ @include font-size(80%); // Add the correct font size in all browsers
159
159
  }
160
160
 
161
161
  //
@@ -166,7 +166,7 @@ small {
166
166
  sub,
167
167
  sup {
168
168
  position: relative;
169
- font-size: 75%;
169
+ @include font-size(75%);
170
170
  line-height: 0;
171
171
  vertical-align: baseline;
172
172
  }
@@ -220,7 +220,7 @@ code,
220
220
  kbd,
221
221
  samp {
222
222
  font-family: $font-family-monospace;
223
- font-size: 1em; // Correct the odd `em` font sizing in all browsers.
223
+ @include font-size(1em); // Correct the odd `em` font sizing in all browsers.
224
224
  }
225
225
 
226
226
  pre {
@@ -297,6 +297,7 @@ label {
297
297
  //
298
298
  // Details at https://github.com/twbs/bootstrap/issues/24093
299
299
  button {
300
+ // stylelint-disable-next-line property-blacklist
300
301
  border-radius: 0;
301
302
  }
302
303
 
@@ -316,7 +317,7 @@ optgroup,
316
317
  textarea {
317
318
  margin: 0; // Remove the margin in Firefox and Safari
318
319
  font-family: inherit;
319
- font-size: inherit;
320
+ @include font-size(inherit);
320
321
  line-height: inherit;
321
322
  }
322
323
 
@@ -330,6 +331,14 @@ select {
330
331
  text-transform: none; // Remove the inheritance of text transform in Firefox
331
332
  }
332
333
 
334
+ // Remove the inheritance of word-wrap in Safari.
335
+ //
336
+ // Details at https://github.com/twbs/bootstrap/issues/24990
337
+ select {
338
+ word-wrap: normal;
339
+ }
340
+
341
+
333
342
  // 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
334
343
  // controls in Android 4.
335
344
  // 2. Correct the inability to style clickable types in iOS and Safari.
@@ -340,6 +349,18 @@ button,
340
349
  -webkit-appearance: button; // 2
341
350
  }
342
351
 
352
+ // Opinionated: add "hand" cursor to non-disabled button elements.
353
+ @if $enable-pointer-cursor-for-buttons {
354
+ button,
355
+ [type="button"],
356
+ [type="reset"],
357
+ [type="submit"] {
358
+ &:not(:disabled) {
359
+ cursor: pointer;
360
+ }
361
+ }
362
+ }
363
+
343
364
  // Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
344
365
  button::-moz-focus-inner,
345
366
  [type="button"]::-moz-focus-inner,
@@ -395,7 +416,7 @@ legend {
395
416
  max-width: 100%; // 1
396
417
  padding: 0;
397
418
  margin-bottom: .5rem;
398
- font-size: 1.5rem;
419
+ @include font-size(1.5rem);
399
420
  line-height: inherit;
400
421
  color: inherit; // 2
401
422
  white-space: normal; // 1
@@ -421,7 +442,7 @@ progress {
421
442
  }
422
443
 
423
444
  //
424
- // Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
445
+ // Remove the inner padding in Chrome and Safari on macOS.
425
446
  //
426
447
 
427
448
  [type="search"]::-webkit-search-decoration {