bootstrap 4.6.2 → 5.0.0.alpha1

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 (135) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/assets/javascripts/bootstrap/alert.js +148 -73
  4. data/assets/javascripts/bootstrap/button.js +71 -154
  5. data/assets/javascripts/bootstrap/carousel.js +315 -209
  6. data/assets/javascripts/bootstrap/collapse.js +307 -153
  7. data/assets/javascripts/bootstrap/dom/data.js +81 -0
  8. data/assets/javascripts/bootstrap/dom/event-handler.js +311 -0
  9. data/assets/javascripts/bootstrap/dom/manipulator.js +100 -0
  10. data/assets/javascripts/bootstrap/dom/polyfill.js +110 -0
  11. data/assets/javascripts/bootstrap/dom/selector-engine.js +98 -0
  12. data/assets/javascripts/bootstrap/dropdown.js +257 -205
  13. data/assets/javascripts/bootstrap/modal.js +354 -250
  14. data/assets/javascripts/bootstrap/popover.js +85 -94
  15. data/assets/javascripts/bootstrap/scrollspy.js +179 -107
  16. data/assets/javascripts/bootstrap/tab.js +170 -99
  17. data/assets/javascripts/bootstrap/toast.js +181 -110
  18. data/assets/javascripts/bootstrap/tooltip.js +375 -226
  19. data/assets/javascripts/bootstrap-sprockets.js +5 -1
  20. data/assets/javascripts/bootstrap.js +2260 -1550
  21. data/assets/javascripts/bootstrap.min.js +3 -3
  22. data/assets/stylesheets/_bootstrap-grid.scss +53 -18
  23. data/assets/stylesheets/_bootstrap-reboot.scss +6 -3
  24. data/assets/stylesheets/_bootstrap.scss +16 -10
  25. data/assets/stylesheets/bootstrap/_alert.scss +3 -4
  26. data/assets/stylesheets/bootstrap/_badge.scss +2 -27
  27. data/assets/stylesheets/bootstrap/_breadcrumb.scss +5 -17
  28. data/assets/stylesheets/bootstrap/_button-group.scss +16 -38
  29. data/assets/stylesheets/bootstrap/_buttons.scss +27 -45
  30. data/assets/stylesheets/bootstrap/_card.scss +22 -68
  31. data/assets/stylesheets/bootstrap/_carousel.scss +15 -20
  32. data/assets/stylesheets/bootstrap/_close.scss +9 -13
  33. data/assets/stylesheets/bootstrap/_containers.scss +41 -0
  34. data/assets/stylesheets/bootstrap/_dropdown.scss +12 -9
  35. data/assets/stylesheets/bootstrap/_forms.scss +9 -347
  36. data/assets/stylesheets/bootstrap/_functions.scss +82 -69
  37. data/assets/stylesheets/bootstrap/_grid.scss +3 -54
  38. data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
  39. data/assets/stylesheets/bootstrap/_images.scss +1 -1
  40. data/assets/stylesheets/bootstrap/_list-group.scss +7 -4
  41. data/assets/stylesheets/bootstrap/_mixins.scss +6 -12
  42. data/assets/stylesheets/bootstrap/_modal.scss +36 -41
  43. data/assets/stylesheets/bootstrap/_nav.scss +7 -9
  44. data/assets/stylesheets/bootstrap/_navbar.scss +42 -82
  45. data/assets/stylesheets/bootstrap/_pagination.scss +7 -20
  46. data/assets/stylesheets/bootstrap/_popover.scss +14 -14
  47. data/assets/stylesheets/bootstrap/_progress.scss +3 -5
  48. data/assets/stylesheets/bootstrap/_reboot.scss +304 -172
  49. data/assets/stylesheets/bootstrap/_root.scss +5 -8
  50. data/assets/stylesheets/bootstrap/_spinners.scss +8 -17
  51. data/assets/stylesheets/bootstrap/_tables.scss +80 -114
  52. data/assets/stylesheets/bootstrap/_toasts.scss +2 -4
  53. data/assets/stylesheets/bootstrap/_tooltip.scss +9 -9
  54. data/assets/stylesheets/bootstrap/_transitions.scss +0 -7
  55. data/assets/stylesheets/bootstrap/_type.scss +38 -59
  56. data/assets/stylesheets/bootstrap/_utilities.scss +503 -18
  57. data/assets/stylesheets/bootstrap/_variables.scss +548 -437
  58. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
  59. data/assets/stylesheets/bootstrap/forms/_form-check.scss +142 -0
  60. data/assets/stylesheets/bootstrap/forms/_form-control.scss +116 -0
  61. data/assets/stylesheets/bootstrap/forms/_form-file.scss +91 -0
  62. data/assets/stylesheets/bootstrap/forms/_form-range.scss +136 -0
  63. data/assets/stylesheets/bootstrap/forms/_form-select.scss +82 -0
  64. data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
  65. data/assets/stylesheets/bootstrap/forms/_input-group.scss +140 -0
  66. data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
  67. data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
  68. data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
  69. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
  70. data/assets/stylesheets/bootstrap/helpers/_embed.scss +31 -0
  71. data/assets/stylesheets/bootstrap/helpers/_position.scss +30 -0
  72. data/assets/stylesheets/bootstrap/helpers/_screenreaders.scss +8 -0
  73. data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
  74. data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
  75. data/assets/stylesheets/bootstrap/mixins/_alert.scss +0 -4
  76. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +1 -1
  77. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +11 -8
  78. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +62 -47
  79. data/assets/stylesheets/bootstrap/mixins/_caret.scss +4 -4
  80. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
  81. data/assets/stylesheets/bootstrap/mixins/_container.scss +9 -0
  82. data/assets/stylesheets/bootstrap/mixins/_forms.scss +23 -85
  83. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +9 -11
  84. data/assets/stylesheets/bootstrap/mixins/_grid.scss +86 -34
  85. data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -21
  86. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -1
  87. data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
  88. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +15 -8
  89. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +3 -3
  90. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +18 -24
  91. data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
  92. data/assets/stylesheets/bootstrap/mixins/_transition.scss +2 -2
  93. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +49 -0
  94. data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
  95. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +214 -130
  96. data/bootstrap.gemspec +1 -1
  97. data/lib/bootstrap/version.rb +2 -2
  98. data/tasks/updater/js.rb +6 -18
  99. data/tasks/updater/network.rb +1 -7
  100. metadata +34 -42
  101. data/assets/javascripts/bootstrap/util.js +0 -189
  102. data/assets/stylesheets/bootstrap/_code.scss +0 -48
  103. data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -526
  104. data/assets/stylesheets/bootstrap/_input-group.scss +0 -211
  105. data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
  106. data/assets/stylesheets/bootstrap/_media.scss +0 -8
  107. data/assets/stylesheets/bootstrap/_print.scss +0 -132
  108. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -23
  109. data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -17
  110. data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -14
  111. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -80
  112. data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
  113. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -11
  114. data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -7
  115. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -39
  116. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -17
  117. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -11
  118. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -8
  119. data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
  120. data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
  121. data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -75
  122. data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -26
  123. data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -39
  124. data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
  125. data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -11
  126. data/assets/stylesheets/bootstrap/utilities/_interactions.scss +0 -5
  127. data/assets/stylesheets/bootstrap/utilities/_overflow.scss +0 -5
  128. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -32
  129. data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
  130. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
  131. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -20
  132. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -73
  133. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +0 -19
  134. data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -72
  135. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -13
@@ -10,17 +10,17 @@
10
10
  > .btn {
11
11
  position: relative;
12
12
  flex: 1 1 auto;
13
+ }
13
14
 
14
- // Bring the hover, focused, and "active" buttons to the front to overlay
15
- // the borders properly
16
- @include hover() {
17
- z-index: 1;
18
- }
19
- &:focus,
20
- &:active,
21
- &.active {
22
- z-index: 1;
23
- }
15
+ // Bring the hover, focused, and "active" buttons to the front to overlay
16
+ // the borders properly
17
+ > .btn-check:checked + .btn,
18
+ > .btn-check:focus + .btn,
19
+ > .btn:hover,
20
+ > .btn:focus,
21
+ > .btn:active,
22
+ > .btn.active {
23
+ z-index: 1;
24
24
  }
25
25
  }
26
26
 
@@ -48,7 +48,12 @@
48
48
  @include border-right-radius(0);
49
49
  }
50
50
 
51
- > .btn:not(:first-child),
51
+ // The left radius should be 0 if the button is:
52
+ // - the "third or more" child
53
+ // - the second child and the previous element isn't `.btn-check` (making it the first child visually)
54
+ // - part of a btn-group which isn't the first child
55
+ > .btn:nth-child(n + 3),
56
+ > :not(.btn-check) + .btn,
52
57
  > .btn-group:not(:first-child) > .btn {
53
58
  @include border-left-radius(0);
54
59
  }
@@ -134,30 +139,3 @@
134
139
  @include border-top-radius(0);
135
140
  }
136
141
  }
137
-
138
-
139
- // Checkbox and radio options
140
- //
141
- // In order to support the browser's form validation feedback, powered by the
142
- // `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
143
- // `display: none;` or `visibility: hidden;` as that also hides the popover.
144
- // Simply visually hiding the inputs via `opacity` would leave them clickable in
145
- // certain cases which is prevented by using `clip` and `pointer-events`.
146
- // This way, we ensure a DOM element is visible to position the popover from.
147
- //
148
- // See https://github.com/twbs/bootstrap/pull/12794 and
149
- // https://github.com/twbs/bootstrap/pull/14559 for more information.
150
-
151
- .btn-group-toggle {
152
- > .btn,
153
- > .btn-group > .btn {
154
- margin-bottom: 0; // Override default `<label>` value
155
-
156
- input[type="radio"],
157
- input[type="checkbox"] {
158
- position: absolute;
159
- clip: rect(0, 0, 0, 0);
160
- pointer-events: none;
161
- }
162
- }
163
- }
@@ -1,5 +1,3 @@
1
- // stylelint-disable selector-no-qualifying-type
2
-
3
1
  //
4
2
  // Base styles
5
3
  //
@@ -8,53 +6,48 @@
8
6
  display: inline-block;
9
7
  font-family: $btn-font-family;
10
8
  font-weight: $btn-font-weight;
9
+ line-height: $btn-line-height;
11
10
  color: $body-color;
12
11
  text-align: center;
13
12
  text-decoration: if($link-decoration == none, null, none);
14
13
  white-space: $btn-white-space;
15
14
  vertical-align: middle;
15
+ cursor: if($enable-button-pointers, pointer, null);
16
16
  user-select: none;
17
17
  background-color: transparent;
18
18
  border: $btn-border-width solid transparent;
19
- @include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-line-height, $btn-border-radius);
19
+ @include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-border-radius);
20
20
  @include transition($btn-transition);
21
21
 
22
- @include hover() {
22
+ &:hover {
23
23
  color: $body-color;
24
- text-decoration: none;
24
+ text-decoration: if($link-hover-decoration == underline, none, null);
25
25
  }
26
26
 
27
- &:focus,
28
- &.focus {
27
+ .btn-check:focus + &,
28
+ &:focus {
29
29
  outline: 0;
30
30
  box-shadow: $btn-focus-box-shadow;
31
31
  }
32
32
 
33
- // Disabled comes first so active can properly restyle
34
- &.disabled,
35
- &:disabled {
36
- opacity: $btn-disabled-opacity;
37
- @include box-shadow(none);
38
- }
33
+ .btn-check:checked + &,
34
+ .btn-check:active + &,
35
+ &:active,
36
+ &.active {
37
+ @include box-shadow($btn-active-box-shadow);
39
38
 
40
- &:not(:disabled):not(.disabled) {
41
- cursor: if($enable-pointer-cursor-for-buttons, pointer, null);
42
-
43
- &:active,
44
- &.active {
45
- @include box-shadow($btn-active-box-shadow);
46
-
47
- &:focus {
48
- @include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
49
- }
39
+ &:focus {
40
+ @include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
50
41
  }
51
42
  }
52
- }
53
43
 
54
- // Future-proof disabling of clicks on `<a>` elements
55
- a.btn.disabled,
56
- fieldset:disabled a.btn {
57
- pointer-events: none;
44
+ &:disabled,
45
+ &.disabled,
46
+ fieldset:disabled & {
47
+ pointer-events: none;
48
+ opacity: $btn-disabled-opacity;
49
+ @include box-shadow(none);
50
+ }
58
51
  }
59
52
 
60
53
 
@@ -82,23 +75,21 @@ fieldset:disabled a.btn {
82
75
  // Make a button look and behave like a link
83
76
  .btn-link {
84
77
  font-weight: $font-weight-normal;
85
- color: $link-color;
78
+ color: $btn-link-color;
86
79
  text-decoration: $link-decoration;
87
80
 
88
- @include hover() {
89
- color: $link-hover-color;
81
+ &:hover {
82
+ color: $btn-link-hover-color;
90
83
  text-decoration: $link-hover-decoration;
91
84
  }
92
85
 
93
- &:focus,
94
- &.focus {
86
+ &:focus {
95
87
  text-decoration: $link-hover-decoration;
96
88
  }
97
89
 
98
90
  &:disabled,
99
91
  &.disabled {
100
92
  color: $btn-link-disabled-color;
101
- pointer-events: none;
102
93
  }
103
94
 
104
95
  // No need for an active state here
@@ -110,11 +101,11 @@ fieldset:disabled a.btn {
110
101
  //
111
102
 
112
103
  .btn-lg {
113
- @include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-line-height-lg, $btn-border-radius-lg);
104
+ @include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-border-radius-lg);
114
105
  }
115
106
 
116
107
  .btn-sm {
117
- @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-line-height-sm, $btn-border-radius-sm);
108
+ @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-border-radius-sm);
118
109
  }
119
110
 
120
111
 
@@ -131,12 +122,3 @@ fieldset:disabled a.btn {
131
122
  margin-top: $btn-block-spacing-y;
132
123
  }
133
124
  }
134
-
135
- // Specificity overrides
136
- input[type="submit"],
137
- input[type="reset"],
138
- input[type="button"] {
139
- &.btn-block {
140
- width: 100%;
141
- }
142
- }
@@ -46,19 +46,16 @@
46
46
  // Enable `flex-grow: 1` for decks and groups so that card blocks take up
47
47
  // as much space as possible, ensuring footers are aligned to the bottom.
48
48
  flex: 1 1 auto;
49
- // Workaround for the image size bug in IE
50
- // See: https://github.com/twbs/bootstrap/pull/28855
51
- min-height: 1px;
52
- padding: $card-spacer-x;
49
+ padding: $card-spacer-y $card-spacer-x;
53
50
  color: $card-color;
54
51
  }
55
52
 
56
53
  .card-title {
57
- margin-bottom: $card-spacer-y;
54
+ margin-bottom: $card-title-spacer-y;
58
55
  }
59
56
 
60
57
  .card-subtitle {
61
- margin-top: -$card-spacer-y * .5;
58
+ margin-top: -$card-title-spacer-y / 2;
62
59
  margin-bottom: 0;
63
60
  }
64
61
 
@@ -67,7 +64,7 @@
67
64
  }
68
65
 
69
66
  .card-link {
70
- @include hover() {
67
+ &:hover {
71
68
  text-decoration: none;
72
69
  }
73
70
 
@@ -81,7 +78,7 @@
81
78
  //
82
79
 
83
80
  .card-header {
84
- padding: $card-spacer-y $card-spacer-x;
81
+ padding: $card-cap-padding-y $card-cap-padding-x;
85
82
  margin-bottom: 0; // Removes the default margin-bottom of <hN>
86
83
  color: $card-cap-color;
87
84
  background-color: $card-cap-bg;
@@ -93,7 +90,7 @@
93
90
  }
94
91
 
95
92
  .card-footer {
96
- padding: $card-spacer-y $card-spacer-x;
93
+ padding: $card-cap-padding-y $card-cap-padding-x;
97
94
  color: $card-cap-color;
98
95
  background-color: $card-cap-bg;
99
96
  border-top: $card-border-width solid $card-border-color;
@@ -109,15 +106,22 @@
109
106
  //
110
107
 
111
108
  .card-header-tabs {
112
- margin-right: -$card-spacer-x * .5;
113
- margin-bottom: -$card-spacer-y;
114
- margin-left: -$card-spacer-x * .5;
109
+ margin-right: -$card-cap-padding-x / 2;
110
+ margin-bottom: -$card-cap-padding-y;
111
+ margin-left: -$card-cap-padding-x / 2;
115
112
  border-bottom: 0;
113
+
114
+ @if $nav-tabs-link-active-bg != $card-bg {
115
+ .nav-link.active {
116
+ background-color: $card-bg;
117
+ border-bottom-color: $card-bg;
118
+ }
119
+ }
116
120
  }
117
121
 
118
122
  .card-header-pills {
119
- margin-right: -$card-spacer-x * .5;
120
- margin-left: -$card-spacer-x * .5;
123
+ margin-right: -$card-cap-padding-x / 2;
124
+ margin-left: -$card-cap-padding-x / 2;
121
125
  }
122
126
 
123
127
  // Card image
@@ -134,7 +138,6 @@
134
138
  .card-img,
135
139
  .card-img-top,
136
140
  .card-img-bottom {
137
- flex-shrink: 0; // For IE: https://github.com/twbs/bootstrap/issues/29396
138
141
  width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
139
142
  }
140
143
 
@@ -149,30 +152,6 @@
149
152
  }
150
153
 
151
154
 
152
- // Card deck
153
-
154
- .card-deck {
155
- .card {
156
- margin-bottom: $card-deck-margin;
157
- }
158
-
159
- @include media-breakpoint-up(sm) {
160
- display: flex;
161
- flex-flow: row wrap;
162
- margin-right: -$card-deck-margin;
163
- margin-left: -$card-deck-margin;
164
-
165
- .card {
166
- // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
167
- flex: 1 0 0%;
168
- margin-right: $card-deck-margin;
169
- margin-bottom: 0; // Override the default
170
- margin-left: $card-deck-margin;
171
- }
172
- }
173
- }
174
-
175
-
176
155
  //
177
156
  // Card groups
178
157
  //
@@ -206,12 +185,12 @@
206
185
 
207
186
  .card-img-top,
208
187
  .card-header {
209
- // stylelint-disable-next-line property-disallowed-list
188
+ // stylelint-disable-next-line property-blacklist
210
189
  border-top-right-radius: 0;
211
190
  }
212
191
  .card-img-bottom,
213
192
  .card-footer {
214
- // stylelint-disable-next-line property-disallowed-list
193
+ // stylelint-disable-next-line property-blacklist
215
194
  border-bottom-right-radius: 0;
216
195
  }
217
196
  }
@@ -221,12 +200,12 @@
221
200
 
222
201
  .card-img-top,
223
202
  .card-header {
224
- // stylelint-disable-next-line property-disallowed-list
203
+ // stylelint-disable-next-line property-blacklist
225
204
  border-top-left-radius: 0;
226
205
  }
227
206
  .card-img-bottom,
228
207
  .card-footer {
229
- // stylelint-disable-next-line property-disallowed-list
208
+ // stylelint-disable-next-line property-blacklist
230
209
  border-bottom-left-radius: 0;
231
210
  }
232
211
  }
@@ -236,36 +215,11 @@
236
215
  }
237
216
 
238
217
 
239
- //
240
- // Columns
241
- //
242
-
243
- .card-columns {
244
- .card {
245
- margin-bottom: $card-columns-margin;
246
- }
247
-
248
- @include media-breakpoint-up(sm) {
249
- column-count: $card-columns-count;
250
- column-gap: $card-columns-gap;
251
- orphans: 1;
252
- widows: 1;
253
-
254
- .card {
255
- display: inline-block; // Don't let them vertically span multiple columns
256
- width: 100%; // Don't let their width change
257
- }
258
- }
259
- }
260
-
261
-
262
218
  //
263
219
  // Accordion
264
220
  //
265
221
 
266
222
  .accordion {
267
- overflow-anchor: none;
268
-
269
223
  > .card {
270
224
  overflow: hidden;
271
225
 
@@ -95,16 +95,14 @@
95
95
  align-items: center; // 2. vertically center contents
96
96
  justify-content: center; // 3. horizontally center contents
97
97
  width: $carousel-control-width;
98
- padding: 0;
99
98
  color: $carousel-control-color;
100
99
  text-align: center;
101
- background: none;
102
- border: 0;
103
100
  opacity: $carousel-control-opacity;
104
101
  @include transition($carousel-control-transition);
105
102
 
106
103
  // Hover/focus state
107
- @include hover-focus() {
104
+ &:hover,
105
+ &:focus {
108
106
  color: $carousel-control-color;
109
107
  text-decoration: none;
110
108
  outline: 0;
@@ -113,15 +111,11 @@
113
111
  }
114
112
  .carousel-control-prev {
115
113
  left: 0;
116
- @if $enable-gradients {
117
- background-image: linear-gradient(90deg, rgba($black, .25), rgba($black, .001));
118
- }
114
+ background-image: if($enable-gradients, linear-gradient(90deg, rgba($black, .25), rgba($black, .001)), null);
119
115
  }
120
116
  .carousel-control-next {
121
117
  right: 0;
122
- @if $enable-gradients {
123
- background-image: linear-gradient(270deg, rgba($black, .25), rgba($black, .001));
124
- }
118
+ background-image: if($enable-gradients, linear-gradient(270deg, rgba($black, .25), rgba($black, .001)), null);
125
119
  }
126
120
 
127
121
  // Icons for within
@@ -130,7 +124,9 @@
130
124
  display: inline-block;
131
125
  width: $carousel-control-icon-width;
132
126
  height: $carousel-control-icon-width;
133
- background: 50% / 100% 100% no-repeat;
127
+ background-repeat: no-repeat;
128
+ background-position: 50%;
129
+ background-size: 100% 100%;
134
130
  }
135
131
  .carousel-control-prev-icon {
136
132
  background-image: escape-svg($carousel-control-prev-icon-bg);
@@ -150,7 +146,7 @@
150
146
  right: 0;
151
147
  bottom: 0;
152
148
  left: 0;
153
- z-index: 15;
149
+ z-index: 2;
154
150
  display: flex;
155
151
  justify-content: center;
156
152
  padding-left: 0; // override <ol> default
@@ -173,12 +169,12 @@
173
169
  // Use transparent borders to increase the hit area by 10px on top and bottom.
174
170
  border-top: $carousel-indicator-hit-area-height solid transparent;
175
171
  border-bottom: $carousel-indicator-hit-area-height solid transparent;
176
- opacity: .5;
172
+ opacity: $carousel-indicator-opacity;
177
173
  @include transition($carousel-indicator-transition);
178
174
  }
179
175
 
180
176
  .active {
181
- opacity: 1;
177
+ opacity: $carousel-indicator-active-opacity;
182
178
  }
183
179
  }
184
180
 
@@ -189,12 +185,11 @@
189
185
 
190
186
  .carousel-caption {
191
187
  position: absolute;
192
- right: (100% - $carousel-caption-width) * .5;
193
- bottom: 20px;
194
- left: (100% - $carousel-caption-width) * .5;
195
- z-index: 10;
196
- padding-top: 20px;
197
- padding-bottom: 20px;
188
+ right: (100% - $carousel-caption-width) / 2;
189
+ bottom: $carousel-caption-spacer;
190
+ left: (100% - $carousel-caption-width) / 2;
191
+ padding-top: $carousel-caption-padding-y;
192
+ padding-bottom: $carousel-caption-padding-y;
198
193
  color: $carousel-caption-color;
199
194
  text-align: center;
200
195
  }
@@ -1,5 +1,4 @@
1
1
  .close {
2
- float: right;
3
2
  @include font-size($close-font-size);
4
3
  font-weight: $close-font-weight;
5
4
  line-height: 1;
@@ -8,15 +7,19 @@
8
7
  opacity: .5;
9
8
 
10
9
  // Override <a>'s hover style
11
- @include hover() {
10
+ &:hover {
12
11
  color: $close-color;
13
12
  text-decoration: none;
14
13
  }
15
14
 
16
- &:not(:disabled):not(.disabled) {
17
- @include hover-focus() {
18
- opacity: .75;
19
- }
15
+ &:hover,
16
+ &:focus {
17
+ opacity: .75;
18
+ }
19
+
20
+ &:disabled,
21
+ &.disabled {
22
+ pointer-events: none;
20
23
  }
21
24
  }
22
25
 
@@ -31,10 +34,3 @@ button.close {
31
34
  background-color: transparent;
32
35
  border: 0;
33
36
  }
34
-
35
- // Future-proof disabling of clicks on `<a>` elements
36
-
37
- // stylelint-disable-next-line selector-no-qualifying-type
38
- a.close.disabled {
39
- pointer-events: none;
40
- }
@@ -0,0 +1,41 @@
1
+ // Container widths
2
+ //
3
+ // Set the container width, and override it for fixed navbars in media queries.
4
+
5
+ @if $enable-grid-classes {
6
+ // Single container class with breakpoint max-widths
7
+ .container,
8
+ // 100% wide container at all breakpoints
9
+ .container-fluid {
10
+ @include make-container();
11
+ }
12
+
13
+ // Responsive containers that are 100% wide until a breakpoint
14
+ @each $breakpoint, $container-max-width in $container-max-widths {
15
+ .container-#{$breakpoint} {
16
+ @extend .container-fluid;
17
+ }
18
+
19
+ @include media-breakpoint-up($breakpoint, $grid-breakpoints) {
20
+ %responsive-container-#{$breakpoint} {
21
+ max-width: $container-max-width;
22
+ }
23
+
24
+ // Extend each breakpoint which is smaller or equal to the current breakpoint
25
+ $extend-breakpoint: true;
26
+
27
+ @each $name, $width in $grid-breakpoints {
28
+ @if ($extend-breakpoint) {
29
+ .container#{breakpoint-infix($name, $grid-breakpoints)} {
30
+ @extend %responsive-container-#{$breakpoint};
31
+ }
32
+
33
+ // Once the current breakpoint is reached, stop extending
34
+ @if ($breakpoint == $name) {
35
+ $extend-breakpoint: false;
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
41
+ }
@@ -20,9 +20,8 @@
20
20
  left: 0;
21
21
  z-index: $zindex-dropdown;
22
22
  display: none; // none by default, but block on "open" of the menu
23
- float: left;
24
23
  min-width: $dropdown-min-width;
25
- padding: $dropdown-padding-y $dropdown-padding-x;
24
+ padding: $dropdown-padding-y 0;
26
25
  margin: $dropdown-spacer 0 0; // override default ul
27
26
  @include font-size($dropdown-font-size);
28
27
  color: $dropdown-color;
@@ -35,6 +34,7 @@
35
34
  @include box-shadow($dropdown-box-shadow);
36
35
  }
37
36
 
37
+ // scss-docs-start responsive-breakpoints
38
38
  @each $breakpoint in map-keys($grid-breakpoints) {
39
39
  @include media-breakpoint-up($breakpoint) {
40
40
  $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
@@ -50,6 +50,7 @@
50
50
  }
51
51
  }
52
52
  }
53
+ // scss-docs-end responsive-breakpoints
53
54
 
54
55
  // Allow for dropdowns to go bottom up (aka, dropup-menu)
55
56
  // Just add .dropup after the standard .dropdown class and you're set.
@@ -100,7 +101,7 @@
100
101
  }
101
102
  }
102
103
 
103
- // When Popper is enabled, reset the basic dropdown position
104
+ // When enabled Popper.js, reset basic dropdown position
104
105
  // stylelint-disable-next-line no-duplicate-selectors
105
106
  .dropdown-menu {
106
107
  &[x-placement^="top"],
@@ -114,7 +115,10 @@
114
115
 
115
116
  // Dividers (basically an `<hr>`) within the dropdown
116
117
  .dropdown-divider {
117
- @include nav-divider($dropdown-divider-bg, $dropdown-divider-margin-y, true);
118
+ height: 0;
119
+ margin: $dropdown-divider-margin-y 0;
120
+ overflow: hidden;
121
+ border-top: 1px solid $dropdown-divider-bg;
118
122
  }
119
123
 
120
124
  // Links, buttons, and more within the dropdown menu
@@ -145,9 +149,10 @@
145
149
  }
146
150
  }
147
151
 
148
- @include hover-focus() {
152
+ &:hover,
153
+ &:focus {
149
154
  color: $dropdown-link-hover-color;
150
- text-decoration: none;
155
+ text-decoration: if($link-hover-decoration == underline, none, null);
151
156
  @include gradient-bg($dropdown-link-hover-bg);
152
157
  }
153
158
 
@@ -164,9 +169,7 @@
164
169
  pointer-events: none;
165
170
  background-color: transparent;
166
171
  // Remove CSS gradients if they're enabled
167
- @if $enable-gradients {
168
- background-image: none;
169
- }
172
+ background-image: if($enable-gradients, none, null);
170
173
  }
171
174
  }
172
175