bootstrap 4.1.3 → 5.0.0

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 (156) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +17 -2
  3. data/CHANGELOG.md +2 -14
  4. data/README.md +7 -4
  5. data/Rakefile +2 -2
  6. data/assets/javascripts/bootstrap/alert.js +226 -166
  7. data/assets/javascripts/bootstrap/base-component.js +63 -0
  8. data/assets/javascripts/bootstrap/button.js +119 -165
  9. data/assets/javascripts/bootstrap/carousel.js +634 -445
  10. data/assets/javascripts/bootstrap/collapse.js +447 -327
  11. data/assets/javascripts/bootstrap/dom/data.js +68 -0
  12. data/assets/javascripts/bootstrap/dom/event-handler.js +322 -0
  13. data/assets/javascripts/bootstrap/dom/manipulator.js +88 -0
  14. data/assets/javascripts/bootstrap/dom/selector-engine.js +85 -0
  15. data/assets/javascripts/bootstrap/dropdown.js +550 -425
  16. data/assets/javascripts/bootstrap/modal.js +695 -492
  17. data/assets/javascripts/bootstrap/offcanvas.js +671 -0
  18. data/assets/javascripts/bootstrap/popover.js +167 -217
  19. data/assets/javascripts/bootstrap/scrollspy.js +319 -302
  20. data/assets/javascripts/bootstrap/tab.js +303 -221
  21. data/assets/javascripts/bootstrap/toast.js +333 -0
  22. data/assets/javascripts/bootstrap/tooltip.js +896 -577
  23. data/assets/javascripts/bootstrap-global-this-define.js +6 -0
  24. data/assets/javascripts/bootstrap-global-this-undefine.js +2 -0
  25. data/assets/javascripts/bootstrap-sprockets.js +15 -7
  26. data/assets/javascripts/bootstrap.js +4262 -3163
  27. data/assets/javascripts/bootstrap.min.js +4 -4
  28. data/assets/stylesheets/_bootstrap-grid.scss +54 -21
  29. data/assets/stylesheets/_bootstrap-reboot.scss +7 -4
  30. data/assets/stylesheets/_bootstrap.scss +21 -11
  31. data/assets/stylesheets/bootstrap/_accordion.scss +118 -0
  32. data/assets/stylesheets/bootstrap/_alert.scss +15 -9
  33. data/assets/stylesheets/bootstrap/_badge.scss +3 -21
  34. data/assets/stylesheets/bootstrap/_breadcrumb.scss +5 -18
  35. data/assets/stylesheets/bootstrap/_button-group.scss +29 -62
  36. data/assets/stylesheets/bootstrap/_buttons.scss +33 -65
  37. data/assets/stylesheets/bootstrap/_card.scss +55 -141
  38. data/assets/stylesheets/bootstrap/_carousel.scss +94 -101
  39. data/assets/stylesheets/bootstrap/_close.scss +33 -28
  40. data/assets/stylesheets/bootstrap/_containers.scss +41 -0
  41. data/assets/stylesheets/bootstrap/_dropdown.scss +114 -40
  42. data/assets/stylesheets/bootstrap/_forms.scss +9 -333
  43. data/assets/stylesheets/bootstrap/_functions.scss +148 -29
  44. data/assets/stylesheets/bootstrap/_grid.scss +4 -34
  45. data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
  46. data/assets/stylesheets/bootstrap/_images.scss +4 -4
  47. data/assets/stylesheets/bootstrap/_list-group.scss +86 -27
  48. data/assets/stylesheets/bootstrap/_mixins.scss +17 -16
  49. data/assets/stylesheets/bootstrap/_modal.scss +90 -42
  50. data/assets/stylesheets/bootstrap/_nav.scss +31 -10
  51. data/assets/stylesheets/bootstrap/_navbar.scss +68 -61
  52. data/assets/stylesheets/bootstrap/_offcanvas.scss +77 -0
  53. data/assets/stylesheets/bootstrap/_pagination.scss +13 -27
  54. data/assets/stylesheets/bootstrap/_popover.scss +63 -88
  55. data/assets/stylesheets/bootstrap/_progress.scss +20 -6
  56. data/assets/stylesheets/bootstrap/_reboot.scss +349 -211
  57. data/assets/stylesheets/bootstrap/_root.scss +5 -8
  58. data/assets/stylesheets/bootstrap/_spinners.scss +69 -0
  59. data/assets/stylesheets/bootstrap/_tables.scss +79 -116
  60. data/assets/stylesheets/bootstrap/_toasts.scss +51 -0
  61. data/assets/stylesheets/bootstrap/_tooltip.scss +18 -18
  62. data/assets/stylesheets/bootstrap/_transitions.scss +2 -3
  63. data/assets/stylesheets/bootstrap/_type.scss +42 -63
  64. data/assets/stylesheets/bootstrap/_utilities.scss +594 -15
  65. data/assets/stylesheets/bootstrap/_variables.scss +952 -440
  66. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
  67. data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +61 -0
  68. data/assets/stylesheets/bootstrap/forms/_form-check.scss +152 -0
  69. data/assets/stylesheets/bootstrap/forms/_form-control.scss +219 -0
  70. data/assets/stylesheets/bootstrap/forms/_form-range.scss +91 -0
  71. data/assets/stylesheets/bootstrap/forms/_form-select.scss +67 -0
  72. data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
  73. data/assets/stylesheets/bootstrap/forms/_input-group.scss +121 -0
  74. data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
  75. data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
  76. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
  77. data/assets/stylesheets/bootstrap/helpers/_position.scss +30 -0
  78. data/assets/stylesheets/bootstrap/helpers/_ratio.scss +26 -0
  79. data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
  80. data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
  81. data/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss +8 -0
  82. data/assets/stylesheets/bootstrap/mixins/_alert.scss +3 -5
  83. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +57 -14
  84. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +14 -1
  85. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +13 -9
  86. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +77 -53
  87. data/assets/stylesheets/bootstrap/mixins/_caret.scss +14 -16
  88. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
  89. data/assets/stylesheets/bootstrap/mixins/_color-scheme.scss +7 -0
  90. data/assets/stylesheets/bootstrap/mixins/_container.scss +9 -0
  91. data/assets/stylesheets/bootstrap/mixins/_deprecate.scss +10 -0
  92. data/assets/stylesheets/bootstrap/mixins/_forms.scss +87 -97
  93. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +13 -11
  94. data/assets/stylesheets/bootstrap/mixins/_grid.scss +106 -33
  95. data/assets/stylesheets/bootstrap/mixins/_image.scss +0 -20
  96. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +5 -2
  97. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +18 -9
  98. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
  99. data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
  100. data/assets/stylesheets/bootstrap/mixins/_transition.scss +19 -6
  101. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +68 -0
  102. data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +29 -0
  103. data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
  104. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +312 -0
  105. data/bootstrap.gemspec +7 -6
  106. data/lib/bootstrap/engine.rb +3 -0
  107. data/lib/bootstrap/version.rb +4 -2
  108. data/lib/bootstrap.rb +10 -7
  109. data/tasks/updater/js.rb +20 -5
  110. data/tasks/updater/network.rb +8 -2
  111. data/test/dummy_rails/app/assets/config/manifest.js +3 -0
  112. data/test/dummy_rails/app/assets/javascripts/application.js +4 -3
  113. data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
  114. data/test/dummy_rails/app/views/layouts/application.html.erb +3 -1
  115. data/test/dummy_rails/app/views/pages/root.html +89 -0
  116. data/test/dummy_rails/config/application.rb +0 -3
  117. data/test/gemfiles/rails_6_0.gemfile +7 -0
  118. data/test/gemfiles/rails_6_1.gemfile +7 -0
  119. data/test/support/dummy_rails_integration.rb +3 -1
  120. data/test/test_helper.rb +18 -13
  121. metadata +64 -79
  122. data/assets/javascripts/bootstrap/util.js +0 -143
  123. data/assets/stylesheets/bootstrap/_code.scss +0 -48
  124. data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -433
  125. data/assets/stylesheets/bootstrap/_input-group.scss +0 -173
  126. data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -16
  127. data/assets/stylesheets/bootstrap/_media.scss +0 -8
  128. data/assets/stylesheets/bootstrap/_print.scss +0 -141
  129. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -21
  130. data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -12
  131. data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -11
  132. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -67
  133. data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
  134. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -10
  135. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +0 -33
  136. data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -6
  137. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -30
  138. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -14
  139. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -13
  140. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -7
  141. data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
  142. data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
  143. data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -59
  144. data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -38
  145. data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -52
  146. data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
  147. data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -9
  148. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -37
  149. data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
  150. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
  151. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -12
  152. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -51
  153. data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -58
  154. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -11
  155. data/test/dummy_rails/app/views/pages/root.html.slim +0 -58
  156. /data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
@@ -6,7 +6,8 @@
6
6
  position: relative;
7
7
  display: flex;
8
8
  flex-direction: column;
9
- min-width: 0;
9
+ min-width: 0; // See https://github.com/twbs/bootstrap/pull/22740#issuecomment-305868106
10
+ height: $card-height;
10
11
  word-wrap: break-word;
11
12
  background-color: $card-bg;
12
13
  background-clip: border-box;
@@ -18,32 +19,43 @@
18
19
  margin-left: 0;
19
20
  }
20
21
 
21
- > .list-group:first-child {
22
- .list-group-item:first-child {
23
- @include border-top-radius($card-border-radius);
22
+ > .list-group {
23
+ border-top: inherit;
24
+ border-bottom: inherit;
25
+
26
+ &:first-child {
27
+ border-top-width: 0;
28
+ @include border-top-radius($card-inner-border-radius);
24
29
  }
25
- }
26
30
 
27
- > .list-group:last-child {
28
- .list-group-item:last-child {
29
- @include border-bottom-radius($card-border-radius);
31
+ &:last-child {
32
+ border-bottom-width: 0;
33
+ @include border-bottom-radius($card-inner-border-radius);
30
34
  }
31
35
  }
36
+
37
+ // Due to specificity of the above selector (`.card > .list-group`), we must
38
+ // use a child selector here to prevent double borders.
39
+ > .card-header + .list-group,
40
+ > .list-group + .card-footer {
41
+ border-top: 0;
42
+ }
32
43
  }
33
44
 
34
45
  .card-body {
35
46
  // Enable `flex-grow: 1` for decks and groups so that card blocks take up
36
47
  // as much space as possible, ensuring footers are aligned to the bottom.
37
48
  flex: 1 1 auto;
38
- padding: $card-spacer-x;
49
+ padding: $card-spacer-y $card-spacer-x;
50
+ color: $card-color;
39
51
  }
40
52
 
41
53
  .card-title {
42
- margin-bottom: $card-spacer-y;
54
+ margin-bottom: $card-title-spacer-y;
43
55
  }
44
56
 
45
57
  .card-subtitle {
46
- margin-top: -($card-spacer-y / 2);
58
+ margin-top: -$card-title-spacer-y / 2;
47
59
  margin-bottom: 0;
48
60
  }
49
61
 
@@ -52,7 +64,7 @@
52
64
  }
53
65
 
54
66
  .card-link {
55
- @include hover {
67
+ &:hover {
56
68
  text-decoration: none;
57
69
  }
58
70
 
@@ -66,24 +78,20 @@
66
78
  //
67
79
 
68
80
  .card-header {
69
- padding: $card-spacer-y $card-spacer-x;
81
+ padding: $card-cap-padding-y $card-cap-padding-x;
70
82
  margin-bottom: 0; // Removes the default margin-bottom of <hN>
83
+ color: $card-cap-color;
71
84
  background-color: $card-cap-bg;
72
85
  border-bottom: $card-border-width solid $card-border-color;
73
86
 
74
87
  &:first-child {
75
88
  @include border-radius($card-inner-border-radius $card-inner-border-radius 0 0);
76
89
  }
77
-
78
- + .list-group {
79
- .list-group-item:first-child {
80
- border-top: 0;
81
- }
82
- }
83
90
  }
84
91
 
85
92
  .card-footer {
86
- padding: $card-spacer-y $card-spacer-x;
93
+ padding: $card-cap-padding-y $card-cap-padding-x;
94
+ color: $card-cap-color;
87
95
  background-color: $card-cap-bg;
88
96
  border-top: $card-border-width solid $card-border-color;
89
97
 
@@ -98,15 +106,22 @@
98
106
  //
99
107
 
100
108
  .card-header-tabs {
101
- margin-right: -($card-spacer-x / 2);
102
- margin-bottom: -$card-spacer-y;
103
- margin-left: -($card-spacer-x / 2);
109
+ margin-right: -$card-cap-padding-x / 2;
110
+ margin-bottom: -$card-cap-padding-y;
111
+ margin-left: -$card-cap-padding-x / 2;
104
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
+ }
105
120
  }
106
121
 
107
122
  .card-header-pills {
108
- margin-right: -($card-spacer-x / 2);
109
- margin-left: -($card-spacer-x / 2);
123
+ margin-right: -$card-cap-padding-x / 2;
124
+ margin-left: -$card-cap-padding-x / 2;
110
125
  }
111
126
 
112
127
  // Card image
@@ -117,61 +132,31 @@
117
132
  bottom: 0;
118
133
  left: 0;
119
134
  padding: $card-img-overlay-padding;
135
+ @include border-radius($card-inner-border-radius);
120
136
  }
121
137
 
122
- .card-img {
138
+ .card-img,
139
+ .card-img-top,
140
+ .card-img-bottom {
123
141
  width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
124
- @include border-radius($card-inner-border-radius);
125
142
  }
126
143
 
127
- // Card image caps
144
+ .card-img,
128
145
  .card-img-top {
129
- width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
130
146
  @include border-top-radius($card-inner-border-radius);
131
147
  }
132
148
 
149
+ .card-img,
133
150
  .card-img-bottom {
134
- width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
135
151
  @include border-bottom-radius($card-inner-border-radius);
136
152
  }
137
153
 
138
154
 
139
- // Card deck
140
-
141
- .card-deck {
142
- display: flex;
143
- flex-direction: column;
144
-
145
- .card {
146
- margin-bottom: $card-deck-margin;
147
- }
148
-
149
- @include media-breakpoint-up(sm) {
150
- flex-flow: row wrap;
151
- margin-right: -$card-deck-margin;
152
- margin-left: -$card-deck-margin;
153
-
154
- .card {
155
- display: flex;
156
- // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
157
- flex: 1 0 0%;
158
- flex-direction: column;
159
- margin-right: $card-deck-margin;
160
- margin-bottom: 0; // Override the default
161
- margin-left: $card-deck-margin;
162
- }
163
- }
164
- }
165
-
166
-
167
155
  //
168
156
  // Card groups
169
157
  //
170
158
 
171
159
  .card-group {
172
- display: flex;
173
- flex-direction: column;
174
-
175
160
  // The child selector allows nested `.card` within `.card-group`
176
161
  // to display properly.
177
162
  > .card {
@@ -179,6 +164,7 @@
179
164
  }
180
165
 
181
166
  @include media-breakpoint-up(sm) {
167
+ display: flex;
182
168
  flex-flow: row wrap;
183
169
  // The child selector allows nested `.card` within `.card-group`
184
170
  // to display properly.
@@ -194,108 +180,36 @@
194
180
 
195
181
  // Handle rounded corners
196
182
  @if $enable-rounded {
197
- &:first-child {
198
- @include border-right-radius(0);
183
+ &:not(:last-child) {
184
+ @include border-end-radius(0);
199
185
 
200
186
  .card-img-top,
201
187
  .card-header {
188
+ // stylelint-disable-next-line property-disallowed-list
202
189
  border-top-right-radius: 0;
203
190
  }
204
191
  .card-img-bottom,
205
192
  .card-footer {
193
+ // stylelint-disable-next-line property-disallowed-list
206
194
  border-bottom-right-radius: 0;
207
195
  }
208
196
  }
209
197
 
210
- &:last-child {
211
- @include border-left-radius(0);
198
+ &:not(:first-child) {
199
+ @include border-start-radius(0);
212
200
 
213
201
  .card-img-top,
214
202
  .card-header {
203
+ // stylelint-disable-next-line property-disallowed-list
215
204
  border-top-left-radius: 0;
216
205
  }
217
206
  .card-img-bottom,
218
207
  .card-footer {
208
+ // stylelint-disable-next-line property-disallowed-list
219
209
  border-bottom-left-radius: 0;
220
210
  }
221
211
  }
222
-
223
- &:only-child {
224
- @include border-radius($card-border-radius);
225
-
226
- .card-img-top,
227
- .card-header {
228
- @include border-top-radius($card-border-radius);
229
- }
230
- .card-img-bottom,
231
- .card-footer {
232
- @include border-bottom-radius($card-border-radius);
233
- }
234
- }
235
-
236
- &:not(:first-child):not(:last-child):not(:only-child) {
237
- @include border-radius(0);
238
-
239
- .card-img-top,
240
- .card-img-bottom,
241
- .card-header,
242
- .card-footer {
243
- @include border-radius(0);
244
- }
245
- }
246
212
  }
247
213
  }
248
214
  }
249
215
  }
250
-
251
-
252
- //
253
- // Columns
254
- //
255
-
256
- .card-columns {
257
- .card {
258
- margin-bottom: $card-columns-margin;
259
- }
260
-
261
- @include media-breakpoint-up(sm) {
262
- column-count: $card-columns-count;
263
- column-gap: $card-columns-gap;
264
- orphans: 1;
265
- widows: 1;
266
-
267
- .card {
268
- display: inline-block; // Don't let them vertically span multiple columns
269
- width: 100%; // Don't let their width change
270
- }
271
- }
272
- }
273
-
274
-
275
- //
276
- // Accordion
277
- //
278
-
279
- .accordion {
280
- .card:not(:first-of-type):not(:last-of-type) {
281
- border-bottom: 0;
282
- border-radius: 0;
283
- }
284
-
285
- .card:not(:first-of-type) {
286
- .card-header:first-child {
287
- border-radius: 0;
288
- }
289
- }
290
-
291
- .card:first-of-type {
292
- border-bottom: 0;
293
- border-bottom-right-radius: 0;
294
- border-bottom-left-radius: 0;
295
- }
296
-
297
- .card:last-of-type {
298
- border-top-left-radius: 0;
299
- border-top-right-radius: 0;
300
- }
301
- }
@@ -1,72 +1,60 @@
1
1
  // Notes on the classes:
2
2
  //
3
- // 1. The .carousel-item-left and .carousel-item-right is used to indicate where
3
+ // 1. .carousel.pointer-event should ideally be pan-y (to allow for users to scroll vertically)
4
+ // even when their scroll action started on a carousel, but for compatibility (with Firefox)
5
+ // we're preventing all actions instead
6
+ // 2. The .carousel-item-start and .carousel-item-end is used to indicate where
4
7
  // the active slide is heading.
5
- // 2. .active.carousel-item is the current slide.
6
- // 3. .active.carousel-item-left and .active.carousel-item-right is the current
8
+ // 3. .active.carousel-item is the current slide.
9
+ // 4. .active.carousel-item-start and .active.carousel-item-end is the current
7
10
  // slide in its in-transition state. Only one of these occurs at a time.
8
- // 4. .carousel-item-next.carousel-item-left and .carousel-item-prev.carousel-item-right
11
+ // 5. .carousel-item-next.carousel-item-start and .carousel-item-prev.carousel-item-end
9
12
  // is the upcoming slide in transition.
10
13
 
11
14
  .carousel {
12
15
  position: relative;
13
16
  }
14
17
 
18
+ .carousel.pointer-event {
19
+ touch-action: pan-y;
20
+ }
21
+
15
22
  .carousel-inner {
16
23
  position: relative;
17
24
  width: 100%;
18
25
  overflow: hidden;
26
+ @include clearfix();
19
27
  }
20
28
 
21
29
  .carousel-item {
22
30
  position: relative;
23
31
  display: none;
24
- align-items: center;
32
+ float: left;
25
33
  width: 100%;
34
+ margin-right: -100%;
26
35
  backface-visibility: hidden;
27
- perspective: 1000px;
36
+ @include transition($carousel-transition);
28
37
  }
29
38
 
30
39
  .carousel-item.active,
31
40
  .carousel-item-next,
32
41
  .carousel-item-prev {
33
42
  display: block;
34
- @include transition($carousel-transition);
35
- }
36
-
37
- .carousel-item-next,
38
- .carousel-item-prev {
39
- position: absolute;
40
- top: 0;
41
43
  }
42
44
 
43
- .carousel-item-next.carousel-item-left,
44
- .carousel-item-prev.carousel-item-right {
45
- transform: translateX(0);
46
-
47
- @supports (transform-style: preserve-3d) {
48
- transform: translate3d(0, 0, 0);
49
- }
50
- }
51
-
52
- .carousel-item-next,
53
- .active.carousel-item-right {
45
+ /* rtl:begin:ignore */
46
+ .carousel-item-next:not(.carousel-item-start),
47
+ .active.carousel-item-end {
54
48
  transform: translateX(100%);
55
-
56
- @supports (transform-style: preserve-3d) {
57
- transform: translate3d(100%, 0, 0);
58
- }
59
49
  }
60
50
 
61
- .carousel-item-prev,
62
- .active.carousel-item-left {
51
+ .carousel-item-prev:not(.carousel-item-end),
52
+ .active.carousel-item-start {
63
53
  transform: translateX(-100%);
64
-
65
- @supports (transform-style: preserve-3d) {
66
- transform: translate3d(-100%, 0, 0);
67
- }
68
54
  }
69
55
 
56
+ /* rtl:end:ignore */
57
+
70
58
 
71
59
  //
72
60
  // Alternate transitions
@@ -75,31 +63,22 @@
75
63
  .carousel-fade {
76
64
  .carousel-item {
77
65
  opacity: 0;
78
- transition-duration: .6s;
79
66
  transition-property: opacity;
67
+ transform: none;
80
68
  }
81
69
 
82
70
  .carousel-item.active,
83
- .carousel-item-next.carousel-item-left,
84
- .carousel-item-prev.carousel-item-right {
71
+ .carousel-item-next.carousel-item-start,
72
+ .carousel-item-prev.carousel-item-end {
73
+ z-index: 1;
85
74
  opacity: 1;
86
75
  }
87
76
 
88
- .active.carousel-item-left,
89
- .active.carousel-item-right {
77
+ .active.carousel-item-start,
78
+ .active.carousel-item-end {
79
+ z-index: 0;
90
80
  opacity: 0;
91
- }
92
-
93
- .carousel-item-next,
94
- .carousel-item-prev,
95
- .carousel-item.active,
96
- .active.carousel-item-left,
97
- .active.carousel-item-prev {
98
- transform: translateX(0);
99
-
100
- @supports (transform-style: preserve-3d) {
101
- transform: translate3d(0, 0, 0);
102
- }
81
+ @include transition(opacity 0s $carousel-transition-duration);
103
82
  }
104
83
  }
105
84
 
@@ -113,36 +92,36 @@
113
92
  position: absolute;
114
93
  top: 0;
115
94
  bottom: 0;
95
+ z-index: 1;
116
96
  // Use flex for alignment (1-3)
117
97
  display: flex; // 1. allow flex styles
118
98
  align-items: center; // 2. vertically center contents
119
99
  justify-content: center; // 3. horizontally center contents
120
100
  width: $carousel-control-width;
101
+ padding: 0;
121
102
  color: $carousel-control-color;
122
103
  text-align: center;
104
+ background: none;
105
+ border: 0;
123
106
  opacity: $carousel-control-opacity;
124
- // We can't have a transition here because WebKit cancels the carousel
125
- // animation if you trip this while in the middle of another animation.
107
+ @include transition($carousel-control-transition);
126
108
 
127
109
  // Hover/focus state
128
- @include hover-focus {
110
+ &:hover,
111
+ &:focus {
129
112
  color: $carousel-control-color;
130
113
  text-decoration: none;
131
114
  outline: 0;
132
- opacity: .9;
115
+ opacity: $carousel-control-hover-opacity;
133
116
  }
134
117
  }
135
118
  .carousel-control-prev {
136
119
  left: 0;
137
- @if $enable-gradients {
138
- background: linear-gradient(90deg, rgba($black, .25), rgba($black, .001));
139
- }
120
+ background-image: if($enable-gradients, linear-gradient(90deg, rgba($black, .25), rgba($black, .001)), null);
140
121
  }
141
122
  .carousel-control-next {
142
123
  right: 0;
143
- @if $enable-gradients {
144
- background: linear-gradient(270deg, rgba($black, .25), rgba($black, .001));
145
- }
124
+ background-image: if($enable-gradients, linear-gradient(270deg, rgba($black, .25), rgba($black, .001)), null);
146
125
  }
147
126
 
148
127
  // Icons for within
@@ -151,70 +130,68 @@
151
130
  display: inline-block;
152
131
  width: $carousel-control-icon-width;
153
132
  height: $carousel-control-icon-width;
154
- background: transparent no-repeat center center;
133
+ background-repeat: no-repeat;
134
+ background-position: 50%;
155
135
  background-size: 100% 100%;
156
136
  }
137
+
138
+ /* rtl:options: {
139
+ "autoRename": true,
140
+ "stringMap":[ {
141
+ "name" : "prev-next",
142
+ "search" : "prev",
143
+ "replace" : "next"
144
+ } ]
145
+ } */
157
146
  .carousel-control-prev-icon {
158
- background-image: $carousel-control-prev-icon-bg;
147
+ background-image: escape-svg($carousel-control-prev-icon-bg);
159
148
  }
160
149
  .carousel-control-next-icon {
161
- background-image: $carousel-control-next-icon-bg;
150
+ background-image: escape-svg($carousel-control-next-icon-bg);
162
151
  }
163
152
 
164
-
165
- // Optional indicator pips
153
+ // Optional indicator pips/controls
166
154
  //
167
- // Add an ordered list with the following class and add a list item for each
168
- // slide your carousel holds.
155
+ // Add a container (such as a list) with the following class and add an item (ideally a focusable control,
156
+ // like a button) with data-bs-target for each slide your carousel holds.
169
157
 
170
158
  .carousel-indicators {
171
159
  position: absolute;
172
160
  right: 0;
173
- bottom: 10px;
161
+ bottom: 0;
174
162
  left: 0;
175
- z-index: 15;
163
+ z-index: 2;
176
164
  display: flex;
177
165
  justify-content: center;
178
- padding-left: 0; // override <ol> default
166
+ padding: 0;
179
167
  // Use the .carousel-control's width as margin so we don't overlay those
180
168
  margin-right: $carousel-control-width;
169
+ margin-bottom: 1rem;
181
170
  margin-left: $carousel-control-width;
182
171
  list-style: none;
183
172
 
184
- li {
185
- position: relative;
173
+ [data-bs-target] {
174
+ box-sizing: content-box;
186
175
  flex: 0 1 auto;
187
176
  width: $carousel-indicator-width;
188
177
  height: $carousel-indicator-height;
178
+ padding: 0;
189
179
  margin-right: $carousel-indicator-spacer;
190
180
  margin-left: $carousel-indicator-spacer;
191
181
  text-indent: -999px;
192
182
  cursor: pointer;
193
- background-color: rgba($carousel-indicator-active-bg, .5);
194
-
195
- // Use pseudo classes to increase the hit area by 10px on top and bottom.
196
- &::before {
197
- position: absolute;
198
- top: -10px;
199
- left: 0;
200
- display: inline-block;
201
- width: 100%;
202
- height: 10px;
203
- content: "";
204
- }
205
- &::after {
206
- position: absolute;
207
- bottom: -10px;
208
- left: 0;
209
- display: inline-block;
210
- width: 100%;
211
- height: 10px;
212
- content: "";
213
- }
183
+ background-color: $carousel-indicator-active-bg;
184
+ background-clip: padding-box;
185
+ border: 0;
186
+ // Use transparent borders to increase the hit area by 10px on top and bottom.
187
+ border-top: $carousel-indicator-hit-area-height solid transparent;
188
+ border-bottom: $carousel-indicator-hit-area-height solid transparent;
189
+ opacity: $carousel-indicator-opacity;
190
+ @include transition($carousel-indicator-transition);
214
191
  }
215
192
 
216
193
  .active {
217
- background-color: $carousel-indicator-active-bg;
194
+ opacity: $carousel-indicator-active-opacity;
218
195
  }
219
196
  }
220
197
 
@@ -225,12 +202,28 @@
225
202
 
226
203
  .carousel-caption {
227
204
  position: absolute;
228
- right: ((100% - $carousel-caption-width) / 2);
229
- bottom: 20px;
230
- left: ((100% - $carousel-caption-width) / 2);
231
- z-index: 10;
232
- padding-top: 20px;
233
- padding-bottom: 20px;
205
+ right: (100% - $carousel-caption-width) / 2;
206
+ bottom: $carousel-caption-spacer;
207
+ left: (100% - $carousel-caption-width) / 2;
208
+ padding-top: $carousel-caption-padding-y;
209
+ padding-bottom: $carousel-caption-padding-y;
234
210
  color: $carousel-caption-color;
235
211
  text-align: center;
236
212
  }
213
+
214
+ // Dark mode carousel
215
+
216
+ .carousel-dark {
217
+ .carousel-control-prev-icon,
218
+ .carousel-control-next-icon {
219
+ filter: $carousel-dark-control-icon-filter;
220
+ }
221
+
222
+ .carousel-indicators [data-bs-target] {
223
+ background-color: $carousel-dark-indicator-active-bg;
224
+ }
225
+
226
+ .carousel-caption {
227
+ color: $carousel-dark-caption-color;
228
+ }
229
+ }