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
@@ -1,7 +1,7 @@
1
1
  // Base class
2
2
  //
3
3
  // Kickstart any navigation component with a set of style resets. Works with
4
- // `<nav>`s or `<ul>`s.
4
+ // `<nav>`s, `<ul>`s or `<ol>`s.
5
5
 
6
6
  .nav {
7
7
  display: flex;
@@ -14,8 +14,9 @@
14
14
  .nav-link {
15
15
  display: block;
16
16
  padding: $nav-link-padding-y $nav-link-padding-x;
17
+ text-decoration: if($link-decoration == none, null, none);
17
18
 
18
- @include hover-focus {
19
+ @include hover-focus() {
19
20
  text-decoration: none;
20
21
  }
21
22
 
@@ -34,15 +35,15 @@
34
35
  .nav-tabs {
35
36
  border-bottom: $nav-tabs-border-width solid $nav-tabs-border-color;
36
37
 
37
- .nav-item {
38
- margin-bottom: -$nav-tabs-border-width;
39
- }
40
-
41
38
  .nav-link {
39
+ margin-bottom: -$nav-tabs-border-width;
40
+ background-color: transparent;
42
41
  border: $nav-tabs-border-width solid transparent;
43
42
  @include border-top-radius($nav-tabs-border-radius);
44
43
 
45
- @include hover-focus {
44
+ @include hover-focus() {
45
+ // Prevents active .nav-link tab overlapping focus outline of previous/next .nav-link
46
+ isolation: isolate;
46
47
  border-color: $nav-tabs-link-hover-border-color;
47
48
  }
48
49
 
@@ -75,6 +76,8 @@
75
76
 
76
77
  .nav-pills {
77
78
  .nav-link {
79
+ background: none;
80
+ border: 0;
78
81
  @include border-radius($nav-pills-border-radius);
79
82
  }
80
83
 
@@ -91,6 +94,7 @@
91
94
  //
92
95
 
93
96
  .nav-fill {
97
+ > .nav-link,
94
98
  .nav-item {
95
99
  flex: 1 1 auto;
96
100
  text-align: center;
@@ -98,6 +102,7 @@
98
102
  }
99
103
 
100
104
  .nav-justified {
105
+ > .nav-link,
101
106
  .nav-item {
102
107
  flex-basis: 0;
103
108
  flex-grow: 1;
@@ -25,13 +25,23 @@
25
25
 
26
26
  // Because flex properties aren't inherited, we need to redeclare these first
27
27
  // few properties so that content nested within behave properly.
28
- > .container,
29
- > .container-fluid {
28
+ %container-flex-properties {
30
29
  display: flex;
31
30
  flex-wrap: wrap;
32
31
  align-items: center;
33
32
  justify-content: space-between;
34
33
  }
34
+
35
+ .container,
36
+ .container-fluid {
37
+ @extend %container-flex-properties;
38
+ }
39
+
40
+ @each $breakpoint, $container-max-width in $container-max-widths {
41
+ > .container#{breakpoint-infix($breakpoint, $container-max-widths)} {
42
+ @extend %container-flex-properties;
43
+ }
44
+ }
35
45
  }
36
46
 
37
47
 
@@ -48,7 +58,7 @@
48
58
  line-height: inherit;
49
59
  white-space: nowrap;
50
60
 
51
- @include hover-focus {
61
+ @include hover-focus() {
52
62
  text-decoration: none;
53
63
  }
54
64
  }
@@ -113,7 +123,7 @@
113
123
  border: $border-width solid transparent; // remove default button style
114
124
  @include border-radius($navbar-toggler-border-radius);
115
125
 
116
- @include hover-focus {
126
+ @include hover-focus() {
117
127
  text-decoration: none;
118
128
  }
119
129
  }
@@ -126,8 +136,12 @@
126
136
  height: 1.5em;
127
137
  vertical-align: middle;
128
138
  content: "";
129
- background: no-repeat center center;
130
- background-size: 100% 100%;
139
+ background: 50% / 100% 100% no-repeat;
140
+ }
141
+
142
+ .navbar-nav-scroll {
143
+ max-height: $navbar-nav-scroll-max-height;
144
+ overflow-y: auto;
131
145
  }
132
146
 
133
147
  // Generate series of `.navbar-expand-*` responsive classes for configuring
@@ -139,11 +153,21 @@
139
153
 
140
154
  &#{$infix} {
141
155
  @include media-breakpoint-down($breakpoint) {
142
- > .container,
143
- > .container-fluid {
156
+ %container-navbar-expand-#{$breakpoint} {
144
157
  padding-right: 0;
145
158
  padding-left: 0;
146
159
  }
160
+
161
+ > .container,
162
+ > .container-fluid {
163
+ @extend %container-navbar-expand-#{$breakpoint};
164
+ }
165
+
166
+ @each $size, $container-max-width in $container-max-widths {
167
+ > .container#{breakpoint-infix($size, $container-max-widths)} {
168
+ @extend %container-navbar-expand-#{$breakpoint};
169
+ }
170
+ }
147
171
  }
148
172
 
149
173
  @include media-breakpoint-up($next) {
@@ -164,9 +188,23 @@
164
188
  }
165
189
 
166
190
  // For nesting containers, have to redeclare for alignment purposes
191
+ %container-nesting-#{$breakpoint} {
192
+ flex-wrap: nowrap;
193
+ }
194
+
167
195
  > .container,
168
196
  > .container-fluid {
169
- flex-wrap: nowrap;
197
+ @extend %container-nesting-#{$breakpoint};
198
+ }
199
+
200
+ @each $size, $container-max-width in $container-max-widths {
201
+ > .container#{breakpoint-infix($size, $container-max-widths)} {
202
+ @extend %container-nesting-#{$breakpoint};
203
+ }
204
+ }
205
+
206
+ .navbar-nav-scroll {
207
+ overflow: visible;
170
208
  }
171
209
 
172
210
  .navbar-collapse {
@@ -194,7 +232,7 @@
194
232
  .navbar-brand {
195
233
  color: $navbar-light-brand-color;
196
234
 
197
- @include hover-focus {
235
+ @include hover-focus() {
198
236
  color: $navbar-light-brand-hover-color;
199
237
  }
200
238
  }
@@ -203,7 +241,7 @@
203
241
  .nav-link {
204
242
  color: $navbar-light-color;
205
243
 
206
- @include hover-focus {
244
+ @include hover-focus() {
207
245
  color: $navbar-light-hover-color;
208
246
  }
209
247
 
@@ -226,7 +264,7 @@
226
264
  }
227
265
 
228
266
  .navbar-toggler-icon {
229
- background-image: $navbar-light-toggler-icon-bg;
267
+ background-image: escape-svg($navbar-light-toggler-icon-bg);
230
268
  }
231
269
 
232
270
  .navbar-text {
@@ -234,7 +272,7 @@
234
272
  a {
235
273
  color: $navbar-light-active-color;
236
274
 
237
- @include hover-focus {
275
+ @include hover-focus() {
238
276
  color: $navbar-light-active-color;
239
277
  }
240
278
  }
@@ -246,7 +284,7 @@
246
284
  .navbar-brand {
247
285
  color: $navbar-dark-brand-color;
248
286
 
249
- @include hover-focus {
287
+ @include hover-focus() {
250
288
  color: $navbar-dark-brand-hover-color;
251
289
  }
252
290
  }
@@ -255,7 +293,7 @@
255
293
  .nav-link {
256
294
  color: $navbar-dark-color;
257
295
 
258
- @include hover-focus {
296
+ @include hover-focus() {
259
297
  color: $navbar-dark-hover-color;
260
298
  }
261
299
 
@@ -278,7 +316,7 @@
278
316
  }
279
317
 
280
318
  .navbar-toggler-icon {
281
- background-image: $navbar-dark-toggler-icon-bg;
319
+ background-image: escape-svg($navbar-dark-toggler-icon-bg);
282
320
  }
283
321
 
284
322
  .navbar-text {
@@ -286,7 +324,7 @@
286
324
  a {
287
325
  color: $navbar-dark-active-color;
288
326
 
289
- @include hover-focus {
327
+ @include hover-focus() {
290
328
  color: $navbar-dark-active-color;
291
329
  }
292
330
  }
@@ -11,6 +11,7 @@
11
11
  margin-left: -$pagination-border-width;
12
12
  line-height: $pagination-line-height;
13
13
  color: $pagination-color;
14
+ text-decoration: if($link-decoration == none, null, none);
14
15
  background-color: $pagination-bg;
15
16
  border: $pagination-border-width solid $pagination-border-color;
16
17
 
@@ -23,7 +24,7 @@
23
24
  }
24
25
 
25
26
  &:focus {
26
- z-index: 2;
27
+ z-index: 3;
27
28
  outline: $pagination-focus-outline;
28
29
  box-shadow: $pagination-focus-box-shadow;
29
30
  }
@@ -43,7 +44,7 @@
43
44
  }
44
45
 
45
46
  &.active .page-link {
46
- z-index: 1;
47
+ z-index: 3;
47
48
  color: $pagination-active-color;
48
49
  background-color: $pagination-active-bg;
49
50
  border-color: $pagination-active-border-color;
@@ -65,9 +66,9 @@
65
66
  //
66
67
 
67
68
  .pagination-lg {
68
- @include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $line-height-lg, $border-radius-lg);
69
+ @include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $line-height-lg, $pagination-border-radius-lg);
69
70
  }
70
71
 
71
72
  .pagination-sm {
72
- @include pagination-size($pagination-padding-y-sm, $pagination-padding-x-sm, $font-size-sm, $line-height-sm, $border-radius-sm);
73
+ @include pagination-size($pagination-padding-y-sm, $pagination-padding-x-sm, $font-size-sm, $line-height-sm, $pagination-border-radius-sm);
73
74
  }
@@ -22,7 +22,7 @@
22
22
  display: block;
23
23
  width: $popover-arrow-width;
24
24
  height: $popover-arrow-height;
25
- margin: 0 $border-radius-lg;
25
+ margin: 0 $popover-border-radius;
26
26
 
27
27
  &::before,
28
28
  &::after {
@@ -39,17 +39,17 @@
39
39
  margin-bottom: $popover-arrow-height;
40
40
 
41
41
  > .arrow {
42
- bottom: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
42
+ bottom: subtract(-$popover-arrow-height, $popover-border-width);
43
43
 
44
44
  &::before {
45
45
  bottom: 0;
46
- border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
46
+ border-width: $popover-arrow-height ($popover-arrow-width * .5) 0;
47
47
  border-top-color: $popover-arrow-outer-color;
48
48
  }
49
49
 
50
50
  &::after {
51
51
  bottom: $popover-border-width;
52
- border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
52
+ border-width: $popover-arrow-height ($popover-arrow-width * .5) 0;
53
53
  border-top-color: $popover-arrow-color;
54
54
  }
55
55
  }
@@ -59,20 +59,20 @@
59
59
  margin-left: $popover-arrow-height;
60
60
 
61
61
  > .arrow {
62
- left: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
62
+ left: subtract(-$popover-arrow-height, $popover-border-width);
63
63
  width: $popover-arrow-height;
64
64
  height: $popover-arrow-width;
65
- margin: $border-radius-lg 0; // make sure the arrow does not touch the popover's rounded corners
65
+ margin: $popover-border-radius 0; // make sure the arrow does not touch the popover's rounded corners
66
66
 
67
67
  &::before {
68
68
  left: 0;
69
- border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
69
+ border-width: ($popover-arrow-width * .5) $popover-arrow-height ($popover-arrow-width * .5) 0;
70
70
  border-right-color: $popover-arrow-outer-color;
71
71
  }
72
72
 
73
73
  &::after {
74
74
  left: $popover-border-width;
75
- border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
75
+ border-width: ($popover-arrow-width * .5) $popover-arrow-height ($popover-arrow-width * .5) 0;
76
76
  border-right-color: $popover-arrow-color;
77
77
  }
78
78
  }
@@ -82,17 +82,17 @@
82
82
  margin-top: $popover-arrow-height;
83
83
 
84
84
  > .arrow {
85
- top: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
85
+ top: subtract(-$popover-arrow-height, $popover-border-width);
86
86
 
87
87
  &::before {
88
88
  top: 0;
89
- border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
89
+ border-width: 0 ($popover-arrow-width * .5) $popover-arrow-height ($popover-arrow-width * .5);
90
90
  border-bottom-color: $popover-arrow-outer-color;
91
91
  }
92
92
 
93
93
  &::after {
94
94
  top: $popover-border-width;
95
- border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
95
+ border-width: 0 ($popover-arrow-width * .5) $popover-arrow-height ($popover-arrow-width * .5);
96
96
  border-bottom-color: $popover-arrow-color;
97
97
  }
98
98
  }
@@ -104,7 +104,7 @@
104
104
  left: 50%;
105
105
  display: block;
106
106
  width: $popover-arrow-width;
107
- margin-left: -$popover-arrow-width / 2;
107
+ margin-left: -$popover-arrow-width * .5;
108
108
  content: "";
109
109
  border-bottom: $popover-border-width solid $popover-header-bg;
110
110
  }
@@ -114,20 +114,20 @@
114
114
  margin-right: $popover-arrow-height;
115
115
 
116
116
  > .arrow {
117
- right: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
117
+ right: subtract(-$popover-arrow-height, $popover-border-width);
118
118
  width: $popover-arrow-height;
119
119
  height: $popover-arrow-width;
120
- margin: $border-radius-lg 0; // make sure the arrow does not touch the popover's rounded corners
120
+ margin: $popover-border-radius 0; // make sure the arrow does not touch the popover's rounded corners
121
121
 
122
122
  &::before {
123
123
  right: 0;
124
- border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
124
+ border-width: ($popover-arrow-width * .5) 0 ($popover-arrow-width * .5) $popover-arrow-height;
125
125
  border-left-color: $popover-arrow-outer-color;
126
126
  }
127
127
 
128
128
  &::after {
129
129
  right: $popover-border-width;
130
- border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
130
+ border-width: ($popover-arrow-width * .5) 0 ($popover-arrow-width * .5) $popover-arrow-height;
131
131
  border-left-color: $popover-arrow-color;
132
132
  }
133
133
  }
@@ -157,8 +157,7 @@
157
157
  color: $popover-header-color;
158
158
  background-color: $popover-header-bg;
159
159
  border-bottom: $popover-border-width solid darken($popover-header-bg, 5%);
160
- $offset-border-width: calc(#{$border-radius-lg} - #{$popover-border-width});
161
- @include border-top-radius($offset-border-width);
160
+ @include border-top-radius($popover-inner-border-radius);
162
161
 
163
162
  &:empty {
164
163
  display: none;
@@ -1,6 +1,6 @@
1
1
  // stylelint-disable declaration-no-important, selector-no-qualifying-type
2
2
 
3
- // Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css
3
+ // Source: https://github.com/h5bp/main.css/blob/master/src/_print.css
4
4
 
5
5
  // ==========================================================================
6
6
  // Print styles.
@@ -55,15 +55,6 @@
55
55
  page-break-inside: avoid;
56
56
  }
57
57
 
58
- //
59
- // Printing Tables:
60
- // http://css-discuss.incutio.com/wiki/Printing_Tables
61
- //
62
-
63
- thead {
64
- display: table-header-group;
65
- }
66
-
67
58
  tr,
68
59
  img {
69
60
  page-break-inside: avoid;
@@ -10,6 +10,7 @@
10
10
  display: flex;
11
11
  height: $progress-height;
12
12
  overflow: hidden; // force rounded corners by cropping it
13
+ line-height: 0;
13
14
  @include font-size($progress-font-size);
14
15
  background-color: $progress-bg;
15
16
  @include border-radius($progress-border-radius);
@@ -20,6 +21,7 @@
20
21
  display: flex;
21
22
  flex-direction: column;
22
23
  justify-content: center;
24
+ overflow: hidden;
23
25
  color: $progress-bar-color;
24
26
  text-align: center;
25
27
  white-space: nowrap;
@@ -34,10 +36,12 @@
34
36
 
35
37
  @if $enable-transitions {
36
38
  .progress-bar-animated {
37
- animation: progress-bar-stripes $progress-bar-animation-timing;
39
+ animation: $progress-bar-animation-timing progress-bar-stripes;
38
40
 
39
- @media (prefers-reduced-motion: reduce) {
40
- animation: none;
41
+ @if $enable-prefers-reduced-motion-media-query {
42
+ @media (prefers-reduced-motion: reduce) {
43
+ animation: none;
44
+ }
41
45
  }
42
46
  }
43
47
  }
@@ -1,4 +1,4 @@
1
- // stylelint-disable at-rule-no-vendor-prefix, declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
1
+ // stylelint-disable declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
2
2
 
3
3
  // Reboot
4
4
  //
@@ -54,12 +54,16 @@ body {
54
54
  background-color: $body-bg; // 2
55
55
  }
56
56
 
57
- // Suppress the focus outline on elements that cannot be accessed via keyboard.
58
- // This prevents an unwanted focus outline from appearing around elements that
59
- // might still respond to pointer events.
57
+ // Future-proof rule: in browsers that support :focus-visible, suppress the focus outline
58
+ // on elements that programmatically receive focus but wouldn't normally show a visible
59
+ // focus outline. In general, this would mean that the outline is only applied if the
60
+ // interaction that led to the element receiving programmatic focus was a keyboard interaction,
61
+ // or the browser has somehow determined that the user is primarily a keyboard user and/or
62
+ // wants focus outlines to always be presented.
60
63
  //
61
- // Credit: https://github.com/suitcss/base
62
- [tabindex="-1"]:focus {
64
+ // See https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible
65
+ // and https://developer.paciellogroup.com/blog/2018/03/focus-visible-and-backwards-compatibility/
66
+ [tabindex="-1"]:focus:not(:focus-visible) {
63
67
  outline: 0 !important;
64
68
  }
65
69
 
@@ -184,30 +188,25 @@ a {
184
188
  text-decoration: $link-decoration;
185
189
  background-color: transparent; // Remove the gray background on active links in IE 10.
186
190
 
187
- @include hover {
191
+ @include hover() {
188
192
  color: $link-hover-color;
189
193
  text-decoration: $link-hover-decoration;
190
194
  }
191
195
  }
192
196
 
193
- // And undo these styles for placeholder links/named anchors (without href)
194
- // which have not been made explicitly keyboard-focusable (without tabindex).
197
+ // And undo these styles for placeholder links/named anchors (without href).
195
198
  // It would be more straightforward to just use a[href] in previous block, but that
196
199
  // causes specificity issues in many other styles that are too complex to fix.
197
200
  // See https://github.com/twbs/bootstrap/issues/19402
198
201
 
199
- a:not([href]):not([tabindex]) {
202
+ a:not([href]):not([class]) {
200
203
  color: inherit;
201
204
  text-decoration: none;
202
205
 
203
- @include hover-focus {
206
+ @include hover() {
204
207
  color: inherit;
205
208
  text-decoration: none;
206
209
  }
207
-
208
- &:focus {
209
- outline: 0;
210
- }
211
210
  }
212
211
 
213
212
 
@@ -230,6 +229,9 @@ pre {
230
229
  margin-bottom: 1rem;
231
230
  // Don't allow content to break outside
232
231
  overflow: auto;
232
+ // Disable auto-hiding scrollbar in IE & legacy Edge to avoid overlap,
233
+ // making it impossible to interact with the content
234
+ -ms-overflow-style: scrollbar;
233
235
  }
234
236
 
235
237
 
@@ -276,10 +278,14 @@ caption {
276
278
  caption-side: bottom;
277
279
  }
278
280
 
281
+ // 1. Removes font-weight bold by inheriting
282
+ // 2. Matches default `<td>` alignment by inheriting `text-align`.
283
+ // 3. Fix alignment for Safari
284
+
279
285
  th {
280
- // Matches default `<td>` alignment by inheriting from the `<body>`, or the
281
- // closest parent with a set `text-align`.
282
- text-align: inherit;
286
+ font-weight: $table-th-font-weight; // 1
287
+ text-align: inherit; // 2
288
+ text-align: -webkit-match-parent; // 3
283
289
  }
284
290
 
285
291
 
@@ -297,17 +303,17 @@ label {
297
303
  //
298
304
  // Details at https://github.com/twbs/bootstrap/issues/24093
299
305
  button {
300
- // stylelint-disable-next-line property-blacklist
306
+ // stylelint-disable-next-line property-disallowed-list
301
307
  border-radius: 0;
302
308
  }
303
309
 
304
- // Work around a Firefox/IE bug where the transparent `button` background
305
- // results in a loss of the default `button` focus styles.
306
- //
307
- // Credit: https://github.com/suitcss/base/
308
- button:focus {
309
- outline: 1px dotted;
310
- outline: 5px auto -webkit-focus-ring-color;
310
+ // Explicitly remove focus outline in Chromium when it shouldn't be
311
+ // visible (e.g. as result of mouse click or touch tap). It already
312
+ // should be doing this automatically, but seems to currently be
313
+ // confused and applies its very visible two-tone outline anyway.
314
+
315
+ button:focus:not(:focus-visible) {
316
+ outline: 0;
311
317
  }
312
318
 
313
319
  input,
@@ -331,6 +337,13 @@ select {
331
337
  text-transform: none; // Remove the inheritance of text transform in Firefox
332
338
  }
333
339
 
340
+ // Set the cursor for non-`<button>` buttons
341
+ //
342
+ // Details at https://github.com/twbs/bootstrap/pull/30562
343
+ [role="button"] {
344
+ cursor: pointer;
345
+ }
346
+
334
347
  // Remove the inheritance of word-wrap in Safari.
335
348
  //
336
349
  // Details at https://github.com/twbs/bootstrap/issues/24990
@@ -377,18 +390,6 @@ input[type="checkbox"] {
377
390
  }
378
391
 
379
392
 
380
- input[type="date"],
381
- input[type="time"],
382
- input[type="datetime-local"],
383
- input[type="month"] {
384
- // Remove the default appearance of temporal inputs to avoid a Mobile Safari
385
- // bug where setting a custom line-height prevents text from being vertically
386
- // centered within the input.
387
- // See https://bugs.webkit.org/show_bug.cgi?id=139848
388
- // and https://github.com/twbs/bootstrap/issues/11266
389
- -webkit-appearance: listbox;
390
- }
391
-
392
393
  textarea {
393
394
  overflow: auto; // Remove the default vertical scrollbar in IE.
394
395
  // Textareas should really only resize vertically so they don't break their (horizontal) containers.
@@ -10,12 +10,12 @@
10
10
  display: inline-block;
11
11
  width: $spinner-width;
12
12
  height: $spinner-height;
13
- vertical-align: text-bottom;
14
- border: $spinner-border-width solid currentColor;
13
+ vertical-align: $spinner-vertical-align;
14
+ border: $spinner-border-width solid currentcolor;
15
15
  border-right-color: transparent;
16
- // stylelint-disable-next-line property-blacklist
16
+ // stylelint-disable-next-line property-disallowed-list
17
17
  border-radius: 50%;
18
- animation: spinner-border .75s linear infinite;
18
+ animation: .75s linear infinite spinner-border;
19
19
  }
20
20
 
21
21
  .spinner-border-sm {
@@ -34,6 +34,7 @@
34
34
  }
35
35
  50% {
36
36
  opacity: 1;
37
+ transform: none;
37
38
  }
38
39
  }
39
40
 
@@ -41,15 +42,24 @@
41
42
  display: inline-block;
42
43
  width: $spinner-width;
43
44
  height: $spinner-height;
44
- vertical-align: text-bottom;
45
- background-color: currentColor;
46
- // stylelint-disable-next-line property-blacklist
45
+ vertical-align: $spinner-vertical-align;
46
+ background-color: currentcolor;
47
+ // stylelint-disable-next-line property-disallowed-list
47
48
  border-radius: 50%;
48
49
  opacity: 0;
49
- animation: spinner-grow .75s linear infinite;
50
+ animation: .75s linear infinite spinner-grow;
50
51
  }
51
52
 
52
53
  .spinner-grow-sm {
53
54
  width: $spinner-width-sm;
54
55
  height: $spinner-height-sm;
55
56
  }
57
+
58
+ @if $enable-prefers-reduced-motion-media-query {
59
+ @media (prefers-reduced-motion: reduce) {
60
+ .spinner-border,
61
+ .spinner-grow {
62
+ animation-duration: 1.5s;
63
+ }
64
+ }
65
+ }
@@ -84,7 +84,7 @@
84
84
 
85
85
  .table-hover {
86
86
  tbody tr {
87
- @include hover {
87
+ @include hover() {
88
88
  color: $table-hover-color;
89
89
  background-color: $table-hover-bg;
90
90
  }
@@ -142,14 +142,14 @@
142
142
  }
143
143
 
144
144
  &.table-striped {
145
- tbody tr:nth-of-type(odd) {
145
+ tbody tr:nth-of-type(#{$table-striped-order}) {
146
146
  background-color: $table-dark-accent-bg;
147
147
  }
148
148
  }
149
149
 
150
150
  &.table-hover {
151
151
  tbody tr {
152
- @include hover {
152
+ @include hover() {
153
153
  color: $table-dark-hover-color;
154
154
  background-color: $table-dark-hover-bg;
155
155
  }