bootstrap 4.6.2 → 5.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +55 -0
- data/README.md +28 -5
- data/assets/javascripts/bootstrap/alert.js +50 -147
- data/assets/javascripts/bootstrap/base-component.js +83 -0
- data/assets/javascripts/bootstrap/button.js +40 -190
- data/assets/javascripts/bootstrap/carousel.js +282 -537
- data/assets/javascripts/bootstrap/collapse.js +166 -314
- data/assets/javascripts/bootstrap/dom/data.js +62 -0
- data/assets/javascripts/bootstrap/dom/event-handler.js +236 -0
- data/assets/javascripts/bootstrap/dom/manipulator.js +71 -0
- data/assets/javascripts/bootstrap/dom/selector-engine.js +103 -0
- data/assets/javascripts/bootstrap/dropdown.js +297 -455
- data/assets/javascripts/bootstrap/modal.js +223 -566
- data/assets/javascripts/bootstrap/offcanvas.js +245 -0
- data/assets/javascripts/bootstrap/popover.js +59 -208
- data/assets/javascripts/bootstrap/scrollspy.js +213 -276
- data/assets/javascripts/bootstrap/tab.js +222 -200
- data/assets/javascripts/bootstrap/toast.js +137 -206
- data/assets/javascripts/bootstrap/tooltip.js +403 -746
- data/assets/javascripts/bootstrap/util/backdrop.js +139 -0
- data/assets/javascripts/bootstrap/util/component-functions.js +41 -0
- data/assets/javascripts/bootstrap/util/config.js +67 -0
- data/assets/javascripts/bootstrap/util/focustrap.js +113 -0
- data/assets/javascripts/bootstrap/util/index.js +281 -0
- data/assets/javascripts/bootstrap/util/sanitizer.js +110 -0
- data/assets/javascripts/bootstrap/util/scrollbar.js +112 -0
- data/assets/javascripts/bootstrap/util/swipe.js +134 -0
- data/assets/javascripts/bootstrap/util/template-factory.js +150 -0
- 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 +21 -5
- data/assets/javascripts/bootstrap.js +3623 -3485
- data/assets/javascripts/bootstrap.min.js +3 -3
- data/assets/stylesheets/_bootstrap-grid.scss +53 -21
- data/assets/stylesheets/_bootstrap-reboot.scss +5 -7
- data/assets/stylesheets/_bootstrap.scss +21 -13
- data/assets/stylesheets/bootstrap/_accordion.scss +158 -0
- data/assets/stylesheets/bootstrap/_alert.scss +32 -16
- data/assets/stylesheets/bootstrap/_badge.scss +15 -31
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +22 -24
- data/assets/stylesheets/bootstrap/_button-group.scss +27 -48
- data/assets/stylesheets/bootstrap/_buttons.scss +136 -71
- data/assets/stylesheets/bootstrap/_card.scss +66 -113
- data/assets/stylesheets/bootstrap/_carousel.scss +78 -34
- data/assets/stylesheets/bootstrap/_close.scss +51 -28
- data/assets/stylesheets/bootstrap/_containers.scss +41 -0
- data/assets/stylesheets/bootstrap/_dropdown.scss +129 -71
- data/assets/stylesheets/bootstrap/_forms.scss +9 -347
- data/assets/stylesheets/bootstrap/_functions.scss +135 -23
- data/assets/stylesheets/bootstrap/_grid.scss +18 -52
- data/assets/stylesheets/bootstrap/_helpers.scss +12 -0
- data/assets/stylesheets/bootstrap/_list-group.scss +77 -34
- data/assets/stylesheets/bootstrap/_maps.scss +174 -0
- data/assets/stylesheets/bootstrap/_mixins.scss +10 -15
- data/assets/stylesheets/bootstrap/_modal.scss +107 -110
- data/assets/stylesheets/bootstrap/_nav.scss +99 -27
- data/assets/stylesheets/bootstrap/_navbar.scss +129 -172
- data/assets/stylesheets/bootstrap/_offcanvas.scss +146 -0
- data/assets/stylesheets/bootstrap/_pagination.scss +72 -37
- data/assets/stylesheets/bootstrap/_placeholders.scss +51 -0
- data/assets/stylesheets/bootstrap/_popover.scss +99 -73
- data/assets/stylesheets/bootstrap/_progress.scss +35 -14
- data/assets/stylesheets/bootstrap/_reboot.scss +318 -192
- data/assets/stylesheets/bootstrap/_root.scss +174 -9
- data/assets/stylesheets/bootstrap/_spinners.scss +43 -23
- data/assets/stylesheets/bootstrap/_tables.scss +101 -115
- data/assets/stylesheets/bootstrap/_toasts.scss +54 -27
- data/assets/stylesheets/bootstrap/_tooltip.scss +67 -63
- data/assets/stylesheets/bootstrap/_transitions.scss +3 -2
- data/assets/stylesheets/bootstrap/_type.scss +40 -59
- data/assets/stylesheets/bootstrap/_utilities.scss +806 -18
- data/assets/stylesheets/bootstrap/_variables-dark.scss +85 -0
- data/assets/stylesheets/bootstrap/_variables.scss +1202 -606
- data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +19 -0
- data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +95 -0
- data/assets/stylesheets/bootstrap/forms/_form-check.scss +188 -0
- data/assets/stylesheets/bootstrap/forms/_form-control.scss +214 -0
- data/assets/stylesheets/bootstrap/forms/_form-range.scss +91 -0
- data/assets/stylesheets/bootstrap/forms/_form-select.scss +80 -0
- data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
- data/assets/stylesheets/bootstrap/forms/_input-group.scss +132 -0
- data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
- data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
- data/assets/stylesheets/bootstrap/helpers/_color-bg.scss +7 -0
- data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +30 -0
- data/assets/stylesheets/bootstrap/helpers/_focus-ring.scss +5 -0
- data/assets/stylesheets/bootstrap/helpers/_icon-link.scss +25 -0
- data/assets/stylesheets/bootstrap/helpers/_position.scss +36 -0
- data/assets/stylesheets/bootstrap/helpers/_ratio.scss +26 -0
- data/assets/stylesheets/bootstrap/helpers/_stacks.scss +15 -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/helpers/_vr.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_alert.scss +11 -6
- data/assets/stylesheets/bootstrap/mixins/_backdrop.scss +14 -0
- data/assets/stylesheets/bootstrap/mixins/_banner.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +10 -8
- data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +7 -9
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +20 -16
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +60 -100
- data/assets/stylesheets/bootstrap/mixins/_caret.scss +34 -27
- data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
- data/assets/stylesheets/bootstrap/mixins/_color-mode.scss +21 -0
- data/assets/stylesheets/bootstrap/mixins/_color-scheme.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_container.scss +11 -0
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +54 -96
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +13 -11
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +118 -36
- data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -21
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +7 -2
- data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +7 -19
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
- data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +24 -0
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_utilities.scss +97 -0
- data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +33 -0
- data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
- data/assets/stylesheets/bootstrap/vendor/_rfs.scss +211 -91
- data/bootstrap.gemspec +3 -5
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/js.rb +17 -5
- data/tasks/updater/network.rb +2 -2
- data/tasks/updater/scss.rb +1 -1
- data/tasks/updater.rb +2 -2
- 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_5_2.gemfile +8 -0
- data/test/gemfiles/rails_6_1.gemfile +7 -0
- data/test/gemfiles/rails_7_0.gemfile +7 -0
- data/test/test_helper.rb +3 -2
- metadata +78 -82
- data/.travis.yml +0 -31
- data/assets/javascripts/bootstrap/util.js +0 -189
- 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 -211
- data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
- data/assets/stylesheets/bootstrap/_media.scss +0 -8
- data/assets/stylesheets/bootstrap/_print.scss +0 -132
- 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
- /data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
@@ -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,13 +42,13 @@
|
|
42
42
|
display: block;
|
43
43
|
}
|
44
44
|
|
45
|
-
.carousel-item-next:not(.carousel-item-
|
46
|
-
.active.carousel-item-
|
45
|
+
.carousel-item-next:not(.carousel-item-start),
|
46
|
+
.active.carousel-item-end {
|
47
47
|
transform: translateX(100%);
|
48
48
|
}
|
49
49
|
|
50
|
-
.carousel-item-prev:not(.carousel-item-
|
51
|
-
.active.carousel-item-
|
50
|
+
.carousel-item-prev:not(.carousel-item-end),
|
51
|
+
.active.carousel-item-start {
|
52
52
|
transform: translateX(-100%);
|
53
53
|
}
|
54
54
|
|
@@ -65,14 +65,14 @@
|
|
65
65
|
}
|
66
66
|
|
67
67
|
.carousel-item.active,
|
68
|
-
.carousel-item-next.carousel-item-
|
69
|
-
.carousel-item-prev.carousel-item-
|
68
|
+
.carousel-item-next.carousel-item-start,
|
69
|
+
.carousel-item-prev.carousel-item-end {
|
70
70
|
z-index: 1;
|
71
71
|
opacity: 1;
|
72
72
|
}
|
73
73
|
|
74
|
-
.active.carousel-item-
|
75
|
-
.active.carousel-item-
|
74
|
+
.active.carousel-item-start,
|
75
|
+
.active.carousel-item-end {
|
76
76
|
z-index: 0;
|
77
77
|
opacity: 0;
|
78
78
|
@include transition(opacity 0s $carousel-transition-duration);
|
@@ -104,7 +104,8 @@
|
|
104
104
|
@include transition($carousel-control-transition);
|
105
105
|
|
106
106
|
// Hover/focus state
|
107
|
-
|
107
|
+
&:hover,
|
108
|
+
&:focus {
|
108
109
|
color: $carousel-control-color;
|
109
110
|
text-decoration: none;
|
110
111
|
outline: 0;
|
@@ -113,15 +114,11 @@
|
|
113
114
|
}
|
114
115
|
.carousel-control-prev {
|
115
116
|
left: 0;
|
116
|
-
|
117
|
-
background-image: linear-gradient(90deg, rgba($black, .25), rgba($black, .001));
|
118
|
-
}
|
117
|
+
background-image: if($enable-gradients, linear-gradient(90deg, rgba($black, .25), rgba($black, .001)), null);
|
119
118
|
}
|
120
119
|
.carousel-control-next {
|
121
120
|
right: 0;
|
122
|
-
|
123
|
-
background-image: linear-gradient(270deg, rgba($black, .25), rgba($black, .001));
|
124
|
-
}
|
121
|
+
background-image: if($enable-gradients, linear-gradient(270deg, rgba($black, .25), rgba($black, .001)), null);
|
125
122
|
}
|
126
123
|
|
127
124
|
// Icons for within
|
@@ -130,8 +127,19 @@
|
|
130
127
|
display: inline-block;
|
131
128
|
width: $carousel-control-icon-width;
|
132
129
|
height: $carousel-control-icon-width;
|
133
|
-
background:
|
134
|
-
|
130
|
+
background-repeat: no-repeat;
|
131
|
+
background-position: 50%;
|
132
|
+
background-size: 100% 100%;
|
133
|
+
}
|
134
|
+
|
135
|
+
/* rtl:options: {
|
136
|
+
"autoRename": true,
|
137
|
+
"stringMap":[ {
|
138
|
+
"name" : "prev-next",
|
139
|
+
"search" : "prev",
|
140
|
+
"replace" : "next"
|
141
|
+
} ]
|
142
|
+
} */
|
135
143
|
.carousel-control-prev-icon {
|
136
144
|
background-image: escape-svg($carousel-control-prev-icon-bg);
|
137
145
|
}
|
@@ -139,46 +147,47 @@
|
|
139
147
|
background-image: escape-svg($carousel-control-next-icon-bg);
|
140
148
|
}
|
141
149
|
|
142
|
-
|
143
|
-
// Optional indicator pips
|
150
|
+
// Optional indicator pips/controls
|
144
151
|
//
|
145
|
-
// Add
|
146
|
-
// slide your carousel holds.
|
152
|
+
// Add a container (such as a list) with the following class and add an item (ideally a focusable control,
|
153
|
+
// like a button) with data-bs-target for each slide your carousel holds.
|
147
154
|
|
148
155
|
.carousel-indicators {
|
149
156
|
position: absolute;
|
150
157
|
right: 0;
|
151
158
|
bottom: 0;
|
152
159
|
left: 0;
|
153
|
-
z-index:
|
160
|
+
z-index: 2;
|
154
161
|
display: flex;
|
155
162
|
justify-content: center;
|
156
|
-
padding
|
163
|
+
padding: 0;
|
157
164
|
// Use the .carousel-control's width as margin so we don't overlay those
|
158
165
|
margin-right: $carousel-control-width;
|
166
|
+
margin-bottom: 1rem;
|
159
167
|
margin-left: $carousel-control-width;
|
160
|
-
list-style: none;
|
161
168
|
|
162
|
-
|
169
|
+
[data-bs-target] {
|
163
170
|
box-sizing: content-box;
|
164
171
|
flex: 0 1 auto;
|
165
172
|
width: $carousel-indicator-width;
|
166
173
|
height: $carousel-indicator-height;
|
174
|
+
padding: 0;
|
167
175
|
margin-right: $carousel-indicator-spacer;
|
168
176
|
margin-left: $carousel-indicator-spacer;
|
169
177
|
text-indent: -999px;
|
170
178
|
cursor: pointer;
|
171
179
|
background-color: $carousel-indicator-active-bg;
|
172
180
|
background-clip: padding-box;
|
181
|
+
border: 0;
|
173
182
|
// Use transparent borders to increase the hit area by 10px on top and bottom.
|
174
183
|
border-top: $carousel-indicator-hit-area-height solid transparent;
|
175
184
|
border-bottom: $carousel-indicator-hit-area-height solid transparent;
|
176
|
-
opacity:
|
185
|
+
opacity: $carousel-indicator-opacity;
|
177
186
|
@include transition($carousel-indicator-transition);
|
178
187
|
}
|
179
188
|
|
180
189
|
.active {
|
181
|
-
opacity:
|
190
|
+
opacity: $carousel-indicator-active-opacity;
|
182
191
|
}
|
183
192
|
}
|
184
193
|
|
@@ -190,11 +199,46 @@
|
|
190
199
|
.carousel-caption {
|
191
200
|
position: absolute;
|
192
201
|
right: (100% - $carousel-caption-width) * .5;
|
193
|
-
bottom:
|
202
|
+
bottom: $carousel-caption-spacer;
|
194
203
|
left: (100% - $carousel-caption-width) * .5;
|
195
|
-
|
196
|
-
padding-
|
197
|
-
padding-bottom: 20px;
|
204
|
+
padding-top: $carousel-caption-padding-y;
|
205
|
+
padding-bottom: $carousel-caption-padding-y;
|
198
206
|
color: $carousel-caption-color;
|
199
207
|
text-align: center;
|
200
208
|
}
|
209
|
+
|
210
|
+
// Dark mode carousel
|
211
|
+
|
212
|
+
@mixin carousel-dark() {
|
213
|
+
.carousel-control-prev-icon,
|
214
|
+
.carousel-control-next-icon {
|
215
|
+
filter: $carousel-dark-control-icon-filter;
|
216
|
+
}
|
217
|
+
|
218
|
+
.carousel-indicators [data-bs-target] {
|
219
|
+
background-color: $carousel-dark-indicator-active-bg;
|
220
|
+
}
|
221
|
+
|
222
|
+
.carousel-caption {
|
223
|
+
color: $carousel-dark-caption-color;
|
224
|
+
}
|
225
|
+
}
|
226
|
+
|
227
|
+
.carousel-dark {
|
228
|
+
@include carousel-dark();
|
229
|
+
}
|
230
|
+
|
231
|
+
@if $enable-dark-mode {
|
232
|
+
@include color-mode(dark) {
|
233
|
+
@if $color-mode-type == "media-query" {
|
234
|
+
.carousel {
|
235
|
+
@include carousel-dark();
|
236
|
+
}
|
237
|
+
} @else {
|
238
|
+
.carousel,
|
239
|
+
&.carousel {
|
240
|
+
@include carousel-dark();
|
241
|
+
}
|
242
|
+
}
|
243
|
+
}
|
244
|
+
}
|
@@ -1,40 +1,63 @@
|
|
1
|
-
.
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
// Transparent background and border properties included for button version.
|
2
|
+
// iOS requires the button element instead of an anchor tag.
|
3
|
+
// If you want the anchor version, it requires `href="#"`.
|
4
|
+
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
|
5
|
+
|
6
|
+
.btn-close {
|
7
|
+
// scss-docs-start close-css-vars
|
8
|
+
--#{$prefix}btn-close-color: #{$btn-close-color};
|
9
|
+
--#{$prefix}btn-close-bg: #{ escape-svg($btn-close-bg) };
|
10
|
+
--#{$prefix}btn-close-opacity: #{$btn-close-opacity};
|
11
|
+
--#{$prefix}btn-close-hover-opacity: #{$btn-close-hover-opacity};
|
12
|
+
--#{$prefix}btn-close-focus-shadow: #{$btn-close-focus-shadow};
|
13
|
+
--#{$prefix}btn-close-focus-opacity: #{$btn-close-focus-opacity};
|
14
|
+
--#{$prefix}btn-close-disabled-opacity: #{$btn-close-disabled-opacity};
|
15
|
+
--#{$prefix}btn-close-white-filter: #{$btn-close-white-filter};
|
16
|
+
// scss-docs-end close-css-vars
|
17
|
+
|
18
|
+
box-sizing: content-box;
|
19
|
+
width: $btn-close-width;
|
20
|
+
height: $btn-close-height;
|
21
|
+
padding: $btn-close-padding-y $btn-close-padding-x;
|
22
|
+
color: var(--#{$prefix}btn-close-color);
|
23
|
+
background: transparent var(--#{$prefix}btn-close-bg) center / $btn-close-width auto no-repeat; // include transparent for button elements
|
24
|
+
border: 0; // for button elements
|
25
|
+
@include border-radius();
|
26
|
+
opacity: var(--#{$prefix}btn-close-opacity);
|
9
27
|
|
10
28
|
// Override <a>'s hover style
|
11
|
-
|
12
|
-
color: $close-color;
|
29
|
+
&:hover {
|
30
|
+
color: var(--#{$prefix}btn-close-color);
|
13
31
|
text-decoration: none;
|
32
|
+
opacity: var(--#{$prefix}btn-close-hover-opacity);
|
14
33
|
}
|
15
34
|
|
16
|
-
&:
|
17
|
-
|
18
|
-
|
19
|
-
}
|
35
|
+
&:focus {
|
36
|
+
outline: 0;
|
37
|
+
box-shadow: var(--#{$prefix}btn-close-focus-shadow);
|
38
|
+
opacity: var(--#{$prefix}btn-close-focus-opacity);
|
20
39
|
}
|
21
|
-
}
|
22
40
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
41
|
+
&:disabled,
|
42
|
+
&.disabled {
|
43
|
+
pointer-events: none;
|
44
|
+
user-select: none;
|
45
|
+
opacity: var(--#{$prefix}btn-close-disabled-opacity);
|
46
|
+
}
|
47
|
+
}
|
27
48
|
|
28
|
-
|
29
|
-
|
30
|
-
padding: 0;
|
31
|
-
background-color: transparent;
|
32
|
-
border: 0;
|
49
|
+
@mixin btn-close-white() {
|
50
|
+
filter: var(--#{$prefix}btn-close-white-filter);
|
33
51
|
}
|
34
52
|
|
35
|
-
|
53
|
+
.btn-close-white {
|
54
|
+
@include btn-close-white();
|
55
|
+
}
|
36
56
|
|
37
|
-
|
38
|
-
|
39
|
-
|
57
|
+
@if $enable-dark-mode {
|
58
|
+
@include color-mode(dark) {
|
59
|
+
.btn-close {
|
60
|
+
@include btn-close-white();
|
61
|
+
}
|
62
|
+
}
|
40
63
|
}
|
@@ -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-container-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
|
+
}
|
@@ -1,8 +1,10 @@
|
|
1
1
|
// The dropdown wrapper (`<div>`)
|
2
2
|
.dropup,
|
3
|
-
.
|
3
|
+
.dropend,
|
4
4
|
.dropdown,
|
5
|
-
.
|
5
|
+
.dropstart,
|
6
|
+
.dropup-center,
|
7
|
+
.dropdown-center {
|
6
8
|
position: relative;
|
7
9
|
}
|
8
10
|
|
@@ -15,50 +17,107 @@
|
|
15
17
|
|
16
18
|
// The dropdown menu
|
17
19
|
.dropdown-menu {
|
20
|
+
// scss-docs-start dropdown-css-vars
|
21
|
+
--#{$prefix}dropdown-zindex: #{$zindex-dropdown};
|
22
|
+
--#{$prefix}dropdown-min-width: #{$dropdown-min-width};
|
23
|
+
--#{$prefix}dropdown-padding-x: #{$dropdown-padding-x};
|
24
|
+
--#{$prefix}dropdown-padding-y: #{$dropdown-padding-y};
|
25
|
+
--#{$prefix}dropdown-spacer: #{$dropdown-spacer};
|
26
|
+
@include rfs($dropdown-font-size, --#{$prefix}dropdown-font-size);
|
27
|
+
--#{$prefix}dropdown-color: #{$dropdown-color};
|
28
|
+
--#{$prefix}dropdown-bg: #{$dropdown-bg};
|
29
|
+
--#{$prefix}dropdown-border-color: #{$dropdown-border-color};
|
30
|
+
--#{$prefix}dropdown-border-radius: #{$dropdown-border-radius};
|
31
|
+
--#{$prefix}dropdown-border-width: #{$dropdown-border-width};
|
32
|
+
--#{$prefix}dropdown-inner-border-radius: #{$dropdown-inner-border-radius};
|
33
|
+
--#{$prefix}dropdown-divider-bg: #{$dropdown-divider-bg};
|
34
|
+
--#{$prefix}dropdown-divider-margin-y: #{$dropdown-divider-margin-y};
|
35
|
+
--#{$prefix}dropdown-box-shadow: #{$dropdown-box-shadow};
|
36
|
+
--#{$prefix}dropdown-link-color: #{$dropdown-link-color};
|
37
|
+
--#{$prefix}dropdown-link-hover-color: #{$dropdown-link-hover-color};
|
38
|
+
--#{$prefix}dropdown-link-hover-bg: #{$dropdown-link-hover-bg};
|
39
|
+
--#{$prefix}dropdown-link-active-color: #{$dropdown-link-active-color};
|
40
|
+
--#{$prefix}dropdown-link-active-bg: #{$dropdown-link-active-bg};
|
41
|
+
--#{$prefix}dropdown-link-disabled-color: #{$dropdown-link-disabled-color};
|
42
|
+
--#{$prefix}dropdown-item-padding-x: #{$dropdown-item-padding-x};
|
43
|
+
--#{$prefix}dropdown-item-padding-y: #{$dropdown-item-padding-y};
|
44
|
+
--#{$prefix}dropdown-header-color: #{$dropdown-header-color};
|
45
|
+
--#{$prefix}dropdown-header-padding-x: #{$dropdown-header-padding-x};
|
46
|
+
--#{$prefix}dropdown-header-padding-y: #{$dropdown-header-padding-y};
|
47
|
+
// scss-docs-end dropdown-css-vars
|
48
|
+
|
18
49
|
position: absolute;
|
19
|
-
|
20
|
-
left: 0;
|
21
|
-
z-index: $zindex-dropdown;
|
50
|
+
z-index: var(--#{$prefix}dropdown-zindex);
|
22
51
|
display: none; // none by default, but block on "open" of the menu
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
color: $dropdown-color;
|
52
|
+
min-width: var(--#{$prefix}dropdown-min-width);
|
53
|
+
padding: var(--#{$prefix}dropdown-padding-y) var(--#{$prefix}dropdown-padding-x);
|
54
|
+
margin: 0; // Override default margin of ul
|
55
|
+
@include font-size(var(--#{$prefix}dropdown-font-size));
|
56
|
+
color: var(--#{$prefix}dropdown-color);
|
29
57
|
text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
|
30
58
|
list-style: none;
|
31
|
-
background-color: $dropdown-bg;
|
59
|
+
background-color: var(--#{$prefix}dropdown-bg);
|
32
60
|
background-clip: padding-box;
|
33
|
-
border: $dropdown-border-width solid $dropdown-border-color;
|
34
|
-
@include border-radius($dropdown-border-radius);
|
35
|
-
@include box-shadow($dropdown-box-shadow);
|
61
|
+
border: var(--#{$prefix}dropdown-border-width) solid var(--#{$prefix}dropdown-border-color);
|
62
|
+
@include border-radius(var(--#{$prefix}dropdown-border-radius));
|
63
|
+
@include box-shadow(var(--#{$prefix}dropdown-box-shadow));
|
64
|
+
|
65
|
+
&[data-bs-popper] {
|
66
|
+
top: 100%;
|
67
|
+
left: 0;
|
68
|
+
margin-top: var(--#{$prefix}dropdown-spacer);
|
69
|
+
}
|
70
|
+
|
71
|
+
@if $dropdown-padding-y == 0 {
|
72
|
+
> .dropdown-item:first-child,
|
73
|
+
> li:first-child .dropdown-item {
|
74
|
+
@include border-top-radius(var(--#{$prefix}dropdown-inner-border-radius));
|
75
|
+
}
|
76
|
+
> .dropdown-item:last-child,
|
77
|
+
> li:last-child .dropdown-item {
|
78
|
+
@include border-bottom-radius(var(--#{$prefix}dropdown-inner-border-radius));
|
79
|
+
}
|
80
|
+
|
81
|
+
}
|
36
82
|
}
|
37
83
|
|
84
|
+
// scss-docs-start responsive-breakpoints
|
85
|
+
// We deliberately hardcode the `bs-` prefix because we check
|
86
|
+
// this custom property in JS to determine Popper's positioning
|
87
|
+
|
38
88
|
@each $breakpoint in map-keys($grid-breakpoints) {
|
39
89
|
@include media-breakpoint-up($breakpoint) {
|
40
90
|
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
41
91
|
|
42
|
-
.dropdown-menu#{$infix}-
|
43
|
-
|
44
|
-
|
92
|
+
.dropdown-menu#{$infix}-start {
|
93
|
+
--bs-position: start;
|
94
|
+
|
95
|
+
&[data-bs-popper] {
|
96
|
+
right: auto;
|
97
|
+
left: 0;
|
98
|
+
}
|
45
99
|
}
|
46
100
|
|
47
|
-
.dropdown-menu#{$infix}-
|
48
|
-
|
49
|
-
|
101
|
+
.dropdown-menu#{$infix}-end {
|
102
|
+
--bs-position: end;
|
103
|
+
|
104
|
+
&[data-bs-popper] {
|
105
|
+
right: 0;
|
106
|
+
left: auto;
|
107
|
+
}
|
50
108
|
}
|
51
109
|
}
|
52
110
|
}
|
111
|
+
// scss-docs-end responsive-breakpoints
|
53
112
|
|
54
113
|
// Allow for dropdowns to go bottom up (aka, dropup-menu)
|
55
114
|
// Just add .dropup after the standard .dropdown class and you're set.
|
56
115
|
.dropup {
|
57
|
-
.dropdown-menu {
|
116
|
+
.dropdown-menu[data-bs-popper] {
|
58
117
|
top: auto;
|
59
118
|
bottom: 100%;
|
60
119
|
margin-top: 0;
|
61
|
-
margin-bottom: $dropdown-spacer;
|
120
|
+
margin-bottom: var(--#{$prefix}dropdown-spacer);
|
62
121
|
}
|
63
122
|
|
64
123
|
.dropdown-toggle {
|
@@ -66,55 +125,48 @@
|
|
66
125
|
}
|
67
126
|
}
|
68
127
|
|
69
|
-
.
|
70
|
-
.dropdown-menu {
|
128
|
+
.dropend {
|
129
|
+
.dropdown-menu[data-bs-popper] {
|
71
130
|
top: 0;
|
72
131
|
right: auto;
|
73
132
|
left: 100%;
|
74
133
|
margin-top: 0;
|
75
|
-
margin-left: $dropdown-spacer;
|
134
|
+
margin-left: var(--#{$prefix}dropdown-spacer);
|
76
135
|
}
|
77
136
|
|
78
137
|
.dropdown-toggle {
|
79
|
-
@include caret(
|
138
|
+
@include caret(end);
|
80
139
|
&::after {
|
81
140
|
vertical-align: 0;
|
82
141
|
}
|
83
142
|
}
|
84
143
|
}
|
85
144
|
|
86
|
-
.
|
87
|
-
.dropdown-menu {
|
145
|
+
.dropstart {
|
146
|
+
.dropdown-menu[data-bs-popper] {
|
88
147
|
top: 0;
|
89
148
|
right: 100%;
|
90
149
|
left: auto;
|
91
150
|
margin-top: 0;
|
92
|
-
margin-right: $dropdown-spacer;
|
151
|
+
margin-right: var(--#{$prefix}dropdown-spacer);
|
93
152
|
}
|
94
153
|
|
95
154
|
.dropdown-toggle {
|
96
|
-
@include caret(
|
155
|
+
@include caret(start);
|
97
156
|
&::before {
|
98
157
|
vertical-align: 0;
|
99
158
|
}
|
100
159
|
}
|
101
160
|
}
|
102
161
|
|
103
|
-
// When Popper is enabled, reset the basic dropdown position
|
104
|
-
// stylelint-disable-next-line no-duplicate-selectors
|
105
|
-
.dropdown-menu {
|
106
|
-
&[x-placement^="top"],
|
107
|
-
&[x-placement^="right"],
|
108
|
-
&[x-placement^="bottom"],
|
109
|
-
&[x-placement^="left"] {
|
110
|
-
right: auto;
|
111
|
-
bottom: auto;
|
112
|
-
}
|
113
|
-
}
|
114
162
|
|
115
163
|
// Dividers (basically an `<hr>`) within the dropdown
|
116
164
|
.dropdown-divider {
|
117
|
-
|
165
|
+
height: 0;
|
166
|
+
margin: var(--#{$prefix}dropdown-divider-margin-y) 0;
|
167
|
+
overflow: hidden;
|
168
|
+
border-top: 1px solid var(--#{$prefix}dropdown-divider-bg);
|
169
|
+
opacity: 1; // Revisit in v6 to de-dupe styles that conflict with <hr> element
|
118
170
|
}
|
119
171
|
|
120
172
|
// Links, buttons, and more within the dropdown menu
|
@@ -123,50 +175,38 @@
|
|
123
175
|
.dropdown-item {
|
124
176
|
display: block;
|
125
177
|
width: 100%; // For `<button>`s
|
126
|
-
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
|
178
|
+
padding: var(--#{$prefix}dropdown-item-padding-y) var(--#{$prefix}dropdown-item-padding-x);
|
127
179
|
clear: both;
|
128
180
|
font-weight: $font-weight-normal;
|
129
|
-
color: $dropdown-link-color;
|
181
|
+
color: var(--#{$prefix}dropdown-link-color);
|
130
182
|
text-align: inherit; // For `<button>`s
|
131
183
|
text-decoration: if($link-decoration == none, null, none);
|
132
184
|
white-space: nowrap; // prevent links from randomly breaking onto new lines
|
133
185
|
background-color: transparent; // For `<button>`s
|
134
186
|
border: 0; // For `<button>`s
|
187
|
+
@include border-radius(var(--#{$prefix}dropdown-item-border-radius, 0));
|
135
188
|
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
}
|
142
|
-
|
143
|
-
&:last-child {
|
144
|
-
@include border-bottom-radius($dropdown-inner-border-radius);
|
145
|
-
}
|
146
|
-
}
|
147
|
-
|
148
|
-
@include hover-focus() {
|
149
|
-
color: $dropdown-link-hover-color;
|
150
|
-
text-decoration: none;
|
151
|
-
@include gradient-bg($dropdown-link-hover-bg);
|
189
|
+
&:hover,
|
190
|
+
&:focus {
|
191
|
+
color: var(--#{$prefix}dropdown-link-hover-color);
|
192
|
+
text-decoration: if($link-hover-decoration == underline, none, null);
|
193
|
+
@include gradient-bg(var(--#{$prefix}dropdown-link-hover-bg));
|
152
194
|
}
|
153
195
|
|
154
196
|
&.active,
|
155
197
|
&:active {
|
156
|
-
color: $dropdown-link-active-color;
|
198
|
+
color: var(--#{$prefix}dropdown-link-active-color);
|
157
199
|
text-decoration: none;
|
158
|
-
@include gradient-bg($dropdown-link-active-bg);
|
200
|
+
@include gradient-bg(var(--#{$prefix}dropdown-link-active-bg));
|
159
201
|
}
|
160
202
|
|
161
203
|
&.disabled,
|
162
204
|
&:disabled {
|
163
|
-
color: $dropdown-link-disabled-color;
|
205
|
+
color: var(--#{$prefix}dropdown-link-disabled-color);
|
164
206
|
pointer-events: none;
|
165
207
|
background-color: transparent;
|
166
208
|
// Remove CSS gradients if they're enabled
|
167
|
-
|
168
|
-
background-image: none;
|
169
|
-
}
|
209
|
+
background-image: if($enable-gradients, none, null);
|
170
210
|
}
|
171
211
|
}
|
172
212
|
|
@@ -177,16 +217,34 @@
|
|
177
217
|
// Dropdown section headers
|
178
218
|
.dropdown-header {
|
179
219
|
display: block;
|
180
|
-
padding: $dropdown-header-padding;
|
220
|
+
padding: var(--#{$prefix}dropdown-header-padding-y) var(--#{$prefix}dropdown-header-padding-x);
|
181
221
|
margin-bottom: 0; // for use with heading elements
|
182
222
|
@include font-size($font-size-sm);
|
183
|
-
color: $dropdown-header-color;
|
223
|
+
color: var(--#{$prefix}dropdown-header-color);
|
184
224
|
white-space: nowrap; // as with > li > a
|
185
225
|
}
|
186
226
|
|
187
227
|
// Dropdown text
|
188
228
|
.dropdown-item-text {
|
189
229
|
display: block;
|
190
|
-
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
|
191
|
-
color: $dropdown-link-color;
|
230
|
+
padding: var(--#{$prefix}dropdown-item-padding-y) var(--#{$prefix}dropdown-item-padding-x);
|
231
|
+
color: var(--#{$prefix}dropdown-link-color);
|
232
|
+
}
|
233
|
+
|
234
|
+
// Dark dropdowns
|
235
|
+
.dropdown-menu-dark {
|
236
|
+
// scss-docs-start dropdown-dark-css-vars
|
237
|
+
--#{$prefix}dropdown-color: #{$dropdown-dark-color};
|
238
|
+
--#{$prefix}dropdown-bg: #{$dropdown-dark-bg};
|
239
|
+
--#{$prefix}dropdown-border-color: #{$dropdown-dark-border-color};
|
240
|
+
--#{$prefix}dropdown-box-shadow: #{$dropdown-dark-box-shadow};
|
241
|
+
--#{$prefix}dropdown-link-color: #{$dropdown-dark-link-color};
|
242
|
+
--#{$prefix}dropdown-link-hover-color: #{$dropdown-dark-link-hover-color};
|
243
|
+
--#{$prefix}dropdown-divider-bg: #{$dropdown-dark-divider-bg};
|
244
|
+
--#{$prefix}dropdown-link-hover-bg: #{$dropdown-dark-link-hover-bg};
|
245
|
+
--#{$prefix}dropdown-link-active-color: #{$dropdown-dark-link-active-color};
|
246
|
+
--#{$prefix}dropdown-link-active-bg: #{$dropdown-dark-link-active-bg};
|
247
|
+
--#{$prefix}dropdown-link-disabled-color: #{$dropdown-dark-link-disabled-color};
|
248
|
+
--#{$prefix}dropdown-header-color: #{$dropdown-dark-header-color};
|
249
|
+
// scss-docs-end dropdown-dark-css-vars
|
192
250
|
}
|