bootstrap 4.6.0 → 5.0.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/README.md +7 -4
- data/assets/javascripts/bootstrap-global-this-define.js +6 -0
- data/assets/javascripts/bootstrap-global-this-undefine.js +2 -0
- data/assets/javascripts/bootstrap-sprockets.js +14 -8
- data/assets/javascripts/bootstrap.js +2152 -1633
- data/assets/javascripts/bootstrap.min.js +2 -2
- data/assets/javascripts/bootstrap/alert.js +179 -64
- data/assets/javascripts/bootstrap/base-component.js +75 -0
- data/assets/javascripts/bootstrap/button.js +94 -143
- data/assets/javascripts/bootstrap/carousel.js +386 -202
- data/assets/javascripts/bootstrap/collapse.js +349 -132
- data/assets/javascripts/bootstrap/dom/data.js +81 -0
- data/assets/javascripts/bootstrap/dom/event-handler.js +310 -0
- data/assets/javascripts/bootstrap/dom/manipulator.js +86 -0
- data/assets/javascripts/bootstrap/dom/selector-engine.js +93 -0
- data/assets/javascripts/bootstrap/dropdown.js +387 -224
- data/assets/javascripts/bootstrap/modal.js +391 -220
- data/assets/javascripts/bootstrap/popover.js +94 -49
- data/assets/javascripts/bootstrap/scrollspy.js +212 -80
- data/assets/javascripts/bootstrap/tab.js +198 -79
- data/assets/javascripts/bootstrap/toast.js +211 -78
- data/assets/javascripts/bootstrap/tooltip.js +558 -300
- data/assets/stylesheets/_bootstrap-grid.scss +51 -16
- data/assets/stylesheets/_bootstrap-reboot.scss +4 -1
- data/assets/stylesheets/_bootstrap.scss +15 -8
- data/assets/stylesheets/bootstrap/_accordion.scss +126 -0
- data/assets/stylesheets/bootstrap/_alert.scss +15 -10
- data/assets/stylesheets/bootstrap/_badge.scss +2 -27
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +3 -17
- data/assets/stylesheets/bootstrap/_button-group.scss +21 -45
- data/assets/stylesheets/bootstrap/_buttons.scss +27 -60
- data/assets/stylesheets/bootstrap/_card.scss +21 -92
- data/assets/stylesheets/bootstrap/_carousel.scss +65 -33
- data/assets/stylesheets/bootstrap/_close.scss +30 -30
- data/assets/stylesheets/bootstrap/_containers.scss +41 -0
- data/assets/stylesheets/bootstrap/_dropdown.scss +95 -38
- data/assets/stylesheets/bootstrap/_forms.scss +9 -347
- data/assets/stylesheets/bootstrap/_functions.scss +84 -23
- data/assets/stylesheets/bootstrap/_grid.scss +3 -54
- data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
- data/assets/stylesheets/bootstrap/_list-group.scss +17 -8
- data/assets/stylesheets/bootstrap/_mixins.scss +7 -13
- data/assets/stylesheets/bootstrap/_modal.scss +41 -46
- data/assets/stylesheets/bootstrap/_nav.scss +16 -4
- data/assets/stylesheets/bootstrap/_navbar.scss +43 -71
- data/assets/stylesheets/bootstrap/_pagination.scss +10 -20
- data/assets/stylesheets/bootstrap/_popover.scss +15 -27
- data/assets/stylesheets/bootstrap/_progress.scss +2 -4
- data/assets/stylesheets/bootstrap/_reboot.scss +314 -163
- data/assets/stylesheets/bootstrap/_root.scss +5 -8
- data/assets/stylesheets/bootstrap/_spinners.scss +5 -5
- data/assets/stylesheets/bootstrap/_tables.scss +79 -114
- data/assets/stylesheets/bootstrap/_toasts.scss +20 -15
- data/assets/stylesheets/bootstrap/_tooltip.scss +17 -17
- data/assets/stylesheets/bootstrap/_transitions.scss +0 -1
- data/assets/stylesheets/bootstrap/_type.scss +38 -59
- data/assets/stylesheets/bootstrap/_utilities.scss +566 -18
- data/assets/stylesheets/bootstrap/_variables.scss +673 -463
- data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
- data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +61 -0
- data/assets/stylesheets/bootstrap/forms/_form-check.scss +152 -0
- data/assets/stylesheets/bootstrap/forms/_form-control.scss +223 -0
- data/assets/stylesheets/bootstrap/forms/_form-range.scss +91 -0
- data/assets/stylesheets/bootstrap/forms/_form-select.scss +67 -0
- data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
- data/assets/stylesheets/bootstrap/forms/_input-group.scss +121 -0
- data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
- data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
- data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
- data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
- data/assets/stylesheets/bootstrap/helpers/_position.scss +30 -0
- data/assets/stylesheets/bootstrap/helpers/_ratio.scss +26 -0
- data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
- data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
- data/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_alert.scss +1 -5
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +8 -8
- data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +7 -9
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +14 -10
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +65 -47
- data/assets/stylesheets/bootstrap/mixins/_caret.scss +8 -8
- data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
- data/assets/stylesheets/bootstrap/mixins/_container.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +27 -88
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +13 -11
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +83 -32
- data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -21
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +3 -2
- data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +15 -8
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
- data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_utilities.scss +68 -0
- data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +29 -0
- data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
- data/assets/stylesheets/bootstrap/vendor/_rfs.scss +234 -126
- data/bootstrap.gemspec +1 -3
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/js.rb +20 -5
- data/test/dummy_rails/app/assets/javascripts/application.js +4 -3
- data/test/dummy_rails/app/views/layouts/application.html.erb +3 -1
- data/test/dummy_rails/app/views/pages/root.html +89 -0
- data/test/dummy_rails/config/application.rb +0 -3
- data/test/gemfiles/rails_6_1.gemfile +7 -0
- metadata +44 -75
- data/assets/javascripts/bootstrap/util.js +0 -192
- data/assets/stylesheets/bootstrap/_code.scss +0 -48
- data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -526
- data/assets/stylesheets/bootstrap/_input-group.scss +0 -208
- data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
- data/assets/stylesheets/bootstrap/_media.scss +0 -8
- data/assets/stylesheets/bootstrap/_print.scss +0 -141
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -23
- data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -17
- data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -14
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -80
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -11
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +0 -34
- data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -7
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -39
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -17
- data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -11
- data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -8
- data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
- data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
- data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -75
- data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -26
- data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -39
- data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
- data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -11
- data/assets/stylesheets/bootstrap/utilities/_interactions.scss +0 -5
- data/assets/stylesheets/bootstrap/utilities/_overflow.scss +0 -5
- data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -32
- data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
- data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
- data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -20
- data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -73
- data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +0 -19
- data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -72
- data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -13
- data/test/dummy_rails/app/views/pages/root.html.slim +0 -58
@@ -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-
|
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
|
-
|
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
|
-
|
28
|
-
|
27
|
+
.btn-check:focus + &,
|
28
|
+
&:focus {
|
29
29
|
outline: 0;
|
30
30
|
box-shadow: $btn-focus-box-shadow;
|
31
31
|
}
|
32
32
|
|
33
|
-
|
34
|
-
|
35
|
-
&:
|
36
|
-
|
37
|
-
@include box-shadow(
|
38
|
-
}
|
39
|
-
|
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);
|
33
|
+
.btn-check:checked + &,
|
34
|
+
.btn-check:active + &,
|
35
|
+
&:active,
|
36
|
+
&.active {
|
37
|
+
@include box-shadow($btn-active-box-shadow);
|
46
38
|
|
47
|
-
|
48
|
-
|
49
|
-
}
|
39
|
+
&:focus {
|
40
|
+
@include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
|
50
41
|
}
|
51
42
|
}
|
52
|
-
}
|
53
43
|
|
54
|
-
|
55
|
-
|
56
|
-
fieldset:disabled
|
57
|
-
|
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
|
-
|
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,33 +101,9 @@ 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-
|
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-
|
118
|
-
}
|
119
|
-
|
120
|
-
|
121
|
-
//
|
122
|
-
// Block button
|
123
|
-
//
|
124
|
-
|
125
|
-
.btn-block {
|
126
|
-
display: block;
|
127
|
-
width: 100%;
|
128
|
-
|
129
|
-
// Vertically space out multiple block buttons
|
130
|
-
+ .btn-block {
|
131
|
-
margin-top: $btn-block-spacing-y;
|
132
|
-
}
|
133
|
-
}
|
134
|
-
|
135
|
-
// Specificity overrides
|
136
|
-
input[type="submit"],
|
137
|
-
input[type="reset"],
|
138
|
-
input[type="button"] {
|
139
|
-
&.btn-block {
|
140
|
-
width: 100%;
|
141
|
-
}
|
108
|
+
@include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-border-radius-sm);
|
142
109
|
}
|
@@ -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
|
-
|
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 / 2;
|
58
|
+
margin-top: -$card-title-spacer-y / 2;
|
62
59
|
margin-bottom: 0;
|
63
60
|
}
|
64
61
|
|
@@ -67,12 +64,12 @@
|
|
67
64
|
}
|
68
65
|
|
69
66
|
.card-link {
|
70
|
-
|
67
|
+
&:hover {
|
71
68
|
text-decoration: none;
|
72
69
|
}
|
73
70
|
|
74
71
|
+ .card-link {
|
75
|
-
margin-left: $card-spacer-x;
|
72
|
+
margin-left: $card-spacer-x #{"/* rtl:ignore */"};
|
76
73
|
}
|
77
74
|
}
|
78
75
|
|
@@ -81,7 +78,7 @@
|
|
81
78
|
//
|
82
79
|
|
83
80
|
.card-header {
|
84
|
-
padding: $card-
|
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-
|
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-
|
113
|
-
margin-bottom: -$card-
|
114
|
-
margin-left: -$card-
|
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-
|
120
|
-
margin-left: -$card-
|
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
|
//
|
@@ -202,7 +181,7 @@
|
|
202
181
|
// Handle rounded corners
|
203
182
|
@if $enable-rounded {
|
204
183
|
&:not(:last-child) {
|
205
|
-
@include border-
|
184
|
+
@include border-end-radius(0);
|
206
185
|
|
207
186
|
.card-img-top,
|
208
187
|
.card-header {
|
@@ -217,7 +196,7 @@
|
|
217
196
|
}
|
218
197
|
|
219
198
|
&:not(:first-child) {
|
220
|
-
@include border-
|
199
|
+
@include border-start-radius(0);
|
221
200
|
|
222
201
|
.card-img-top,
|
223
202
|
.card-header {
|
@@ -234,53 +213,3 @@
|
|
234
213
|
}
|
235
214
|
}
|
236
215
|
}
|
237
|
-
|
238
|
-
|
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
|
-
//
|
263
|
-
// Accordion
|
264
|
-
//
|
265
|
-
|
266
|
-
.accordion {
|
267
|
-
overflow-anchor: none;
|
268
|
-
|
269
|
-
> .card {
|
270
|
-
overflow: hidden;
|
271
|
-
|
272
|
-
&:not(:last-of-type) {
|
273
|
-
border-bottom: 0;
|
274
|
-
@include border-bottom-radius(0);
|
275
|
-
}
|
276
|
-
|
277
|
-
&:not(:first-of-type) {
|
278
|
-
@include border-top-radius(0);
|
279
|
-
}
|
280
|
-
|
281
|
-
> .card-header {
|
282
|
-
@include border-radius(0);
|
283
|
-
margin-bottom: -$card-border-width;
|
284
|
-
}
|
285
|
-
}
|
286
|
-
}
|
@@ -3,12 +3,12 @@
|
|
3
3
|
// 1. .carousel.pointer-event should ideally be pan-y (to allow for users to scroll vertically)
|
4
4
|
// even when their scroll action started on a carousel, but for compatibility (with Firefox)
|
5
5
|
// we're preventing all actions instead
|
6
|
-
// 2. The .carousel-item-
|
6
|
+
// 2. The .carousel-item-start and .carousel-item-end is used to indicate where
|
7
7
|
// the active slide is heading.
|
8
8
|
// 3. .active.carousel-item is the current slide.
|
9
|
-
// 4. .active.carousel-item-
|
9
|
+
// 4. .active.carousel-item-start and .active.carousel-item-end is the current
|
10
10
|
// slide in its in-transition state. Only one of these occurs at a time.
|
11
|
-
// 5. .carousel-item-next.carousel-item-
|
11
|
+
// 5. .carousel-item-next.carousel-item-start and .carousel-item-prev.carousel-item-end
|
12
12
|
// is the upcoming slide in transition.
|
13
13
|
|
14
14
|
.carousel {
|
@@ -42,16 +42,19 @@
|
|
42
42
|
display: block;
|
43
43
|
}
|
44
44
|
|
45
|
-
|
46
|
-
.
|
45
|
+
/* rtl:begin:ignore */
|
46
|
+
.carousel-item-next:not(.carousel-item-start),
|
47
|
+
.active.carousel-item-end {
|
47
48
|
transform: translateX(100%);
|
48
49
|
}
|
49
50
|
|
50
|
-
.carousel-item-prev:not(.carousel-item-
|
51
|
-
.active.carousel-item-
|
51
|
+
.carousel-item-prev:not(.carousel-item-end),
|
52
|
+
.active.carousel-item-start {
|
52
53
|
transform: translateX(-100%);
|
53
54
|
}
|
54
55
|
|
56
|
+
/* rtl:end:ignore */
|
57
|
+
|
55
58
|
|
56
59
|
//
|
57
60
|
// Alternate transitions
|
@@ -65,14 +68,14 @@
|
|
65
68
|
}
|
66
69
|
|
67
70
|
.carousel-item.active,
|
68
|
-
.carousel-item-next.carousel-item-
|
69
|
-
.carousel-item-prev.carousel-item-
|
71
|
+
.carousel-item-next.carousel-item-start,
|
72
|
+
.carousel-item-prev.carousel-item-end {
|
70
73
|
z-index: 1;
|
71
74
|
opacity: 1;
|
72
75
|
}
|
73
76
|
|
74
|
-
.active.carousel-item-
|
75
|
-
.active.carousel-item-
|
77
|
+
.active.carousel-item-start,
|
78
|
+
.active.carousel-item-end {
|
76
79
|
z-index: 0;
|
77
80
|
opacity: 0;
|
78
81
|
@include transition(opacity 0s $carousel-transition-duration);
|
@@ -95,13 +98,17 @@
|
|
95
98
|
align-items: center; // 2. vertically center contents
|
96
99
|
justify-content: center; // 3. horizontally center contents
|
97
100
|
width: $carousel-control-width;
|
101
|
+
padding: 0;
|
98
102
|
color: $carousel-control-color;
|
99
103
|
text-align: center;
|
104
|
+
background: none;
|
105
|
+
border: 0;
|
100
106
|
opacity: $carousel-control-opacity;
|
101
107
|
@include transition($carousel-control-transition);
|
102
108
|
|
103
109
|
// Hover/focus state
|
104
|
-
|
110
|
+
&:hover,
|
111
|
+
&:focus {
|
105
112
|
color: $carousel-control-color;
|
106
113
|
text-decoration: none;
|
107
114
|
outline: 0;
|
@@ -110,15 +117,11 @@
|
|
110
117
|
}
|
111
118
|
.carousel-control-prev {
|
112
119
|
left: 0;
|
113
|
-
|
114
|
-
background-image: linear-gradient(90deg, rgba($black, .25), rgba($black, .001));
|
115
|
-
}
|
120
|
+
background-image: if($enable-gradients, linear-gradient(90deg, rgba($black, .25), rgba($black, .001)), null);
|
116
121
|
}
|
117
122
|
.carousel-control-next {
|
118
123
|
right: 0;
|
119
|
-
|
120
|
-
background-image: linear-gradient(270deg, rgba($black, .25), rgba($black, .001));
|
121
|
-
}
|
124
|
+
background-image: if($enable-gradients, linear-gradient(270deg, rgba($black, .25), rgba($black, .001)), null);
|
122
125
|
}
|
123
126
|
|
124
127
|
// Icons for within
|
@@ -127,8 +130,19 @@
|
|
127
130
|
display: inline-block;
|
128
131
|
width: $carousel-control-icon-width;
|
129
132
|
height: $carousel-control-icon-width;
|
130
|
-
background:
|
131
|
-
|
133
|
+
background-repeat: no-repeat;
|
134
|
+
background-position: 50%;
|
135
|
+
background-size: 100% 100%;
|
136
|
+
}
|
137
|
+
|
138
|
+
/* rtl:options: {
|
139
|
+
"autoRename": true,
|
140
|
+
"stringMap":[ {
|
141
|
+
"name" : "prev-next",
|
142
|
+
"search" : "prev",
|
143
|
+
"replace" : "next"
|
144
|
+
} ]
|
145
|
+
} */
|
132
146
|
.carousel-control-prev-icon {
|
133
147
|
background-image: escape-svg($carousel-control-prev-icon-bg);
|
134
148
|
}
|
@@ -136,46 +150,48 @@
|
|
136
150
|
background-image: escape-svg($carousel-control-next-icon-bg);
|
137
151
|
}
|
138
152
|
|
139
|
-
|
140
|
-
// Optional indicator pips
|
153
|
+
// Optional indicator pips/controls
|
141
154
|
//
|
142
|
-
// Add
|
143
|
-
// 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.
|
144
157
|
|
145
158
|
.carousel-indicators {
|
146
159
|
position: absolute;
|
147
160
|
right: 0;
|
148
161
|
bottom: 0;
|
149
162
|
left: 0;
|
150
|
-
z-index:
|
163
|
+
z-index: 2;
|
151
164
|
display: flex;
|
152
165
|
justify-content: center;
|
153
|
-
padding
|
166
|
+
padding: 0;
|
154
167
|
// Use the .carousel-control's width as margin so we don't overlay those
|
155
168
|
margin-right: $carousel-control-width;
|
169
|
+
margin-bottom: 1rem;
|
156
170
|
margin-left: $carousel-control-width;
|
157
171
|
list-style: none;
|
158
172
|
|
159
|
-
|
173
|
+
[data-bs-target] {
|
160
174
|
box-sizing: content-box;
|
161
175
|
flex: 0 1 auto;
|
162
176
|
width: $carousel-indicator-width;
|
163
177
|
height: $carousel-indicator-height;
|
178
|
+
padding: 0;
|
164
179
|
margin-right: $carousel-indicator-spacer;
|
165
180
|
margin-left: $carousel-indicator-spacer;
|
166
181
|
text-indent: -999px;
|
167
182
|
cursor: pointer;
|
168
183
|
background-color: $carousel-indicator-active-bg;
|
169
184
|
background-clip: padding-box;
|
185
|
+
border: 0;
|
170
186
|
// Use transparent borders to increase the hit area by 10px on top and bottom.
|
171
187
|
border-top: $carousel-indicator-hit-area-height solid transparent;
|
172
188
|
border-bottom: $carousel-indicator-hit-area-height solid transparent;
|
173
|
-
opacity:
|
189
|
+
opacity: $carousel-indicator-opacity;
|
174
190
|
@include transition($carousel-indicator-transition);
|
175
191
|
}
|
176
192
|
|
177
193
|
.active {
|
178
|
-
opacity:
|
194
|
+
opacity: $carousel-indicator-active-opacity;
|
179
195
|
}
|
180
196
|
}
|
181
197
|
|
@@ -187,11 +203,27 @@
|
|
187
203
|
.carousel-caption {
|
188
204
|
position: absolute;
|
189
205
|
right: (100% - $carousel-caption-width) / 2;
|
190
|
-
bottom:
|
206
|
+
bottom: $carousel-caption-spacer;
|
191
207
|
left: (100% - $carousel-caption-width) / 2;
|
192
|
-
|
193
|
-
padding-
|
194
|
-
padding-bottom: 20px;
|
208
|
+
padding-top: $carousel-caption-padding-y;
|
209
|
+
padding-bottom: $carousel-caption-padding-y;
|
195
210
|
color: $carousel-caption-color;
|
196
211
|
text-align: center;
|
197
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
|
+
}
|