bootstrap 4.0.0 → 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.travis.yml +1 -1
- data/CHANGELOG.md +8 -0
- data/README.md +2 -2
- data/Rakefile +4 -2
- data/assets/javascripts/bootstrap/alert.js +45 -22
- data/assets/javascripts/bootstrap/button.js +39 -19
- data/assets/javascripts/bootstrap/carousel.js +213 -51
- data/assets/javascripts/bootstrap/collapse.js +105 -52
- data/assets/javascripts/bootstrap/dropdown.js +169 -45
- data/assets/javascripts/bootstrap/modal.js +139 -71
- data/assets/javascripts/bootstrap/popover.js +77 -20
- data/assets/javascripts/bootstrap/scrollspy.js +87 -29
- data/assets/javascripts/bootstrap/tab.js +50 -32
- data/assets/javascripts/bootstrap/toast.js +282 -0
- data/assets/javascripts/bootstrap/tooltip.js +295 -59
- data/assets/javascripts/bootstrap/util.js +78 -45
- data/assets/javascripts/bootstrap-sprockets.js +7 -6
- data/assets/javascripts/bootstrap.js +1537 -996
- data/assets/javascripts/bootstrap.min.js +3 -3
- data/assets/stylesheets/_bootstrap-grid.scss +4 -7
- data/assets/stylesheets/_bootstrap-reboot.scss +3 -3
- data/assets/stylesheets/_bootstrap.scss +5 -3
- data/assets/stylesheets/bootstrap/_alert.scss +1 -1
- data/assets/stylesheets/bootstrap/_badge.scss +8 -1
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +9 -6
- data/assets/stylesheets/bootstrap/_button-group.scss +16 -19
- data/assets/stylesheets/bootstrap/_buttons.scss +10 -16
- data/assets/stylesheets/bootstrap/_card.scss +53 -34
- data/assets/stylesheets/bootstrap/_carousel.scss +66 -60
- data/assets/stylesheets/bootstrap/_close.scss +15 -8
- data/assets/stylesheets/bootstrap/_code.scss +5 -13
- data/assets/stylesheets/bootstrap/_custom-forms.scss +250 -40
- data/assets/stylesheets/bootstrap/_dropdown.scss +65 -5
- data/assets/stylesheets/bootstrap/_forms.scss +32 -35
- data/assets/stylesheets/bootstrap/_functions.scss +9 -9
- data/assets/stylesheets/bootstrap/_images.scss +2 -2
- data/assets/stylesheets/bootstrap/_input-group.scss +45 -11
- data/assets/stylesheets/bootstrap/_jumbotron.scss +1 -0
- data/assets/stylesheets/bootstrap/_list-group.scss +39 -5
- data/assets/stylesheets/bootstrap/_mixins.scss +6 -1
- data/assets/stylesheets/bootstrap/_modal.scss +80 -19
- data/assets/stylesheets/bootstrap/_nav.scss +2 -0
- data/assets/stylesheets/bootstrap/_navbar.scss +9 -26
- data/assets/stylesheets/bootstrap/_pagination.scss +2 -6
- data/assets/stylesheets/bootstrap/_popover.scss +47 -59
- data/assets/stylesheets/bootstrap/_print.scss +23 -6
- data/assets/stylesheets/bootstrap/_progress.scss +16 -6
- data/assets/stylesheets/bootstrap/_reboot.scss +51 -50
- data/assets/stylesheets/bootstrap/_spinners.scss +55 -0
- data/assets/stylesheets/bootstrap/_tables.scss +16 -11
- data/assets/stylesheets/bootstrap/_toasts.scss +44 -0
- data/assets/stylesheets/bootstrap/_tooltip.scss +1 -1
- data/assets/stylesheets/bootstrap/_transitions.scss +4 -20
- data/assets/stylesheets/bootstrap/_type.scss +16 -16
- data/assets/stylesheets/bootstrap/_utilities.scss +3 -0
- data/assets/stylesheets/bootstrap/_variables.scss +430 -201
- data/assets/stylesheets/bootstrap/mixins/_badge.scss +7 -2
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +29 -1
- data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +16 -1
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +3 -3
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +12 -14
- data/assets/stylesheets/bootstrap/mixins/_caret.scss +5 -8
- data/assets/stylesheets/bootstrap/mixins/_deprecate.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_float.scss +3 -0
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +68 -13
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +7 -7
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +3 -4
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +9 -10
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +3 -5
- data/assets/stylesheets/bootstrap/mixins/_image.scss +2 -2
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +2 -2
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +1 -3
- data/assets/stylesheets/bootstrap/mixins/_size.scss +1 -0
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +10 -1
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +5 -3
- data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +3 -1
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_visibility.scss +1 -0
- data/assets/stylesheets/bootstrap/utilities/_borders.scss +17 -1
- data/assets/stylesheets/bootstrap/utilities/_display.scss +6 -18
- data/assets/stylesheets/bootstrap/utilities/_embed.scss +7 -20
- data/assets/stylesheets/bootstrap/utilities/_flex.scss +5 -0
- data/assets/stylesheets/bootstrap/utilities/_float.scss +5 -3
- data/assets/stylesheets/bootstrap/utilities/_overflow.scss +5 -0
- data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -4
- data/assets/stylesheets/bootstrap/utilities/_shadows.scss +6 -0
- data/assets/stylesheets/bootstrap/utilities/_sizing.scss +8 -0
- data/assets/stylesheets/bootstrap/utilities/_spacing.scss +23 -1
- data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +19 -0
- data/assets/stylesheets/bootstrap/utilities/_text.scss +26 -6
- data/assets/stylesheets/bootstrap/utilities/_visibility.scss +4 -2
- data/assets/stylesheets/bootstrap/vendor/_rfs.scss +204 -0
- data/bootstrap.gemspec +6 -3
- data/lib/bootstrap/engine.rb +3 -0
- data/lib/bootstrap/version.rb +4 -2
- data/lib/bootstrap.rb +10 -7
- data/tasks/updater/js.rb +1 -1
- data/test/test_helper.rb +7 -6
- metadata +19 -12
- data/assets/stylesheets/bootstrap/mixins/_navbar-align.scss +0 -10
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
.custom-control {
|
|
11
11
|
position: relative;
|
|
12
12
|
display: block;
|
|
13
|
-
min-height:
|
|
14
|
-
padding-left: $custom-control-gutter;
|
|
13
|
+
min-height: $font-size-base * $line-height-base;
|
|
14
|
+
padding-left: $custom-control-gutter + $custom-control-indicator-size;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.custom-control-inline {
|
|
@@ -26,18 +26,28 @@
|
|
|
26
26
|
|
|
27
27
|
&:checked ~ .custom-control-label::before {
|
|
28
28
|
color: $custom-control-indicator-checked-color;
|
|
29
|
+
border-color: $custom-control-indicator-checked-border-color;
|
|
29
30
|
@include gradient-bg($custom-control-indicator-checked-bg);
|
|
30
31
|
@include box-shadow($custom-control-indicator-checked-box-shadow);
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
&:focus ~ .custom-control-label::before {
|
|
34
35
|
// the mixin is not used here to make sure there is feedback
|
|
35
|
-
|
|
36
|
+
@if $enable-shadows {
|
|
37
|
+
box-shadow: $input-box-shadow, $input-focus-box-shadow;
|
|
38
|
+
} @else {
|
|
39
|
+
box-shadow: $custom-control-indicator-focus-box-shadow;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:focus:not(:checked) ~ .custom-control-label::before {
|
|
44
|
+
border-color: $custom-control-indicator-focus-border-color;
|
|
36
45
|
}
|
|
37
46
|
|
|
38
|
-
&:active ~ .custom-control-label::before {
|
|
47
|
+
&:not(:disabled):active ~ .custom-control-label::before {
|
|
39
48
|
color: $custom-control-indicator-active-color;
|
|
40
49
|
background-color: $custom-control-indicator-active-bg;
|
|
50
|
+
border-color: $custom-control-indicator-active-border-color;
|
|
41
51
|
@include box-shadow($custom-control-indicator-active-box-shadow);
|
|
42
52
|
}
|
|
43
53
|
|
|
@@ -54,38 +64,38 @@
|
|
|
54
64
|
|
|
55
65
|
// Custom control indicators
|
|
56
66
|
//
|
|
57
|
-
// Build the custom controls out of
|
|
67
|
+
// Build the custom controls out of pseudo-elements.
|
|
58
68
|
|
|
59
69
|
.custom-control-label {
|
|
70
|
+
position: relative;
|
|
60
71
|
margin-bottom: 0;
|
|
72
|
+
vertical-align: top;
|
|
61
73
|
|
|
62
74
|
// Background-color and (when enabled) gradient
|
|
63
75
|
&::before {
|
|
64
76
|
position: absolute;
|
|
65
|
-
top: (
|
|
66
|
-
left:
|
|
77
|
+
top: ($font-size-base * $line-height-base - $custom-control-indicator-size) / 2;
|
|
78
|
+
left: -($custom-control-gutter + $custom-control-indicator-size);
|
|
67
79
|
display: block;
|
|
68
80
|
width: $custom-control-indicator-size;
|
|
69
81
|
height: $custom-control-indicator-size;
|
|
70
82
|
pointer-events: none;
|
|
71
83
|
content: "";
|
|
72
|
-
user-select: none;
|
|
73
84
|
background-color: $custom-control-indicator-bg;
|
|
85
|
+
border: $custom-control-indicator-border-color solid $custom-control-indicator-border-width;
|
|
74
86
|
@include box-shadow($custom-control-indicator-box-shadow);
|
|
75
87
|
}
|
|
76
88
|
|
|
77
89
|
// Foreground (icon)
|
|
78
90
|
&::after {
|
|
79
91
|
position: absolute;
|
|
80
|
-
top: (
|
|
81
|
-
left:
|
|
92
|
+
top: ($font-size-base * $line-height-base - $custom-control-indicator-size) / 2;
|
|
93
|
+
left: -($custom-control-gutter + $custom-control-indicator-size);
|
|
82
94
|
display: block;
|
|
83
95
|
width: $custom-control-indicator-size;
|
|
84
96
|
height: $custom-control-indicator-size;
|
|
85
97
|
content: "";
|
|
86
|
-
background
|
|
87
|
-
background-position: center center;
|
|
88
|
-
background-size: $custom-control-indicator-bg-size;
|
|
98
|
+
background: no-repeat 50% / #{$custom-control-indicator-bg-size};
|
|
89
99
|
}
|
|
90
100
|
}
|
|
91
101
|
|
|
@@ -100,9 +110,6 @@
|
|
|
100
110
|
}
|
|
101
111
|
|
|
102
112
|
.custom-control-input:checked ~ .custom-control-label {
|
|
103
|
-
&::before {
|
|
104
|
-
@include gradient-bg($custom-control-indicator-checked-bg);
|
|
105
|
-
}
|
|
106
113
|
&::after {
|
|
107
114
|
background-image: $custom-checkbox-indicator-icon-checked;
|
|
108
115
|
}
|
|
@@ -110,6 +117,7 @@
|
|
|
110
117
|
|
|
111
118
|
.custom-control-input:indeterminate ~ .custom-control-label {
|
|
112
119
|
&::before {
|
|
120
|
+
border-color: $custom-checkbox-indicator-indeterminate-border-color;
|
|
113
121
|
@include gradient-bg($custom-checkbox-indicator-indeterminate-bg);
|
|
114
122
|
@include box-shadow($custom-checkbox-indicator-indeterminate-box-shadow);
|
|
115
123
|
}
|
|
@@ -134,15 +142,56 @@
|
|
|
134
142
|
|
|
135
143
|
.custom-radio {
|
|
136
144
|
.custom-control-label::before {
|
|
145
|
+
// stylelint-disable-next-line property-blacklist
|
|
137
146
|
border-radius: $custom-radio-indicator-border-radius;
|
|
138
147
|
}
|
|
139
148
|
|
|
140
149
|
.custom-control-input:checked ~ .custom-control-label {
|
|
150
|
+
&::after {
|
|
151
|
+
background-image: $custom-radio-indicator-icon-checked;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.custom-control-input:disabled {
|
|
156
|
+
&:checked ~ .custom-control-label::before {
|
|
157
|
+
background-color: $custom-control-indicator-checked-disabled-bg;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
// switches
|
|
164
|
+
//
|
|
165
|
+
// Tweak a few things for switches
|
|
166
|
+
|
|
167
|
+
.custom-switch {
|
|
168
|
+
padding-left: $custom-switch-width + $custom-control-gutter;
|
|
169
|
+
|
|
170
|
+
.custom-control-label {
|
|
141
171
|
&::before {
|
|
142
|
-
|
|
172
|
+
left: -($custom-switch-width + $custom-control-gutter);
|
|
173
|
+
width: $custom-switch-width;
|
|
174
|
+
pointer-events: all;
|
|
175
|
+
// stylelint-disable-next-line property-blacklist
|
|
176
|
+
border-radius: $custom-switch-indicator-border-radius;
|
|
143
177
|
}
|
|
178
|
+
|
|
144
179
|
&::after {
|
|
145
|
-
|
|
180
|
+
top: calc(#{(($font-size-base * $line-height-base - $custom-control-indicator-size) / 2)} + #{$custom-control-indicator-border-width * 2});
|
|
181
|
+
left: calc(#{-($custom-switch-width + $custom-control-gutter)} + #{$custom-control-indicator-border-width * 2});
|
|
182
|
+
width: $custom-switch-indicator-size;
|
|
183
|
+
height: $custom-switch-indicator-size;
|
|
184
|
+
background-color: $custom-control-indicator-border-color;
|
|
185
|
+
// stylelint-disable-next-line property-blacklist
|
|
186
|
+
border-radius: $custom-switch-indicator-border-radius;
|
|
187
|
+
@include transition(transform .15s ease-in-out, $custom-forms-transition);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.custom-control-input:checked ~ .custom-control-label {
|
|
192
|
+
&::after {
|
|
193
|
+
background-color: $custom-control-indicator-bg;
|
|
194
|
+
transform: translateX($custom-switch-width - $custom-control-indicator-size);
|
|
146
195
|
}
|
|
147
196
|
}
|
|
148
197
|
|
|
@@ -157,7 +206,7 @@
|
|
|
157
206
|
// Select
|
|
158
207
|
//
|
|
159
208
|
// Replaces the browser default select with a custom one, mostly pulled from
|
|
160
|
-
//
|
|
209
|
+
// https://primer.github.io/.
|
|
161
210
|
//
|
|
162
211
|
|
|
163
212
|
.custom-select {
|
|
@@ -165,23 +214,27 @@
|
|
|
165
214
|
width: 100%;
|
|
166
215
|
height: $custom-select-height;
|
|
167
216
|
padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x;
|
|
217
|
+
font-family: $custom-select-font-family;
|
|
218
|
+
@include font-size($custom-select-font-size);
|
|
219
|
+
font-weight: $custom-select-font-weight;
|
|
168
220
|
line-height: $custom-select-line-height;
|
|
169
221
|
color: $custom-select-color;
|
|
170
222
|
vertical-align: middle;
|
|
171
|
-
background: $custom-select-
|
|
172
|
-
background-
|
|
223
|
+
background: $custom-select-background;
|
|
224
|
+
background-color: $custom-select-bg;
|
|
173
225
|
border: $custom-select-border-width solid $custom-select-border-color;
|
|
174
|
-
@
|
|
175
|
-
|
|
176
|
-
} @else {
|
|
177
|
-
border-radius: 0;
|
|
178
|
-
}
|
|
226
|
+
@include border-radius($custom-select-border-radius, 0);
|
|
227
|
+
@include box-shadow($custom-select-box-shadow);
|
|
179
228
|
appearance: none;
|
|
180
229
|
|
|
181
230
|
&:focus {
|
|
182
231
|
border-color: $custom-select-focus-border-color;
|
|
183
232
|
outline: 0;
|
|
184
|
-
|
|
233
|
+
@if $enable-shadows {
|
|
234
|
+
box-shadow: $custom-select-box-shadow, $custom-select-focus-box-shadow;
|
|
235
|
+
} @else {
|
|
236
|
+
box-shadow: $custom-select-focus-box-shadow;
|
|
237
|
+
}
|
|
185
238
|
|
|
186
239
|
&::-ms-value {
|
|
187
240
|
// For visual consistency with other platforms/browsers,
|
|
@@ -208,22 +261,24 @@
|
|
|
208
261
|
|
|
209
262
|
// Hides the default caret in IE11
|
|
210
263
|
&::-ms-expand {
|
|
211
|
-
|
|
264
|
+
display: none;
|
|
212
265
|
}
|
|
213
266
|
}
|
|
214
267
|
|
|
215
268
|
.custom-select-sm {
|
|
216
269
|
height: $custom-select-height-sm;
|
|
217
|
-
padding-top: $custom-select-padding-y;
|
|
218
|
-
padding-bottom: $custom-select-padding-y;
|
|
219
|
-
|
|
270
|
+
padding-top: $custom-select-padding-y-sm;
|
|
271
|
+
padding-bottom: $custom-select-padding-y-sm;
|
|
272
|
+
padding-left: $custom-select-padding-x-sm;
|
|
273
|
+
@include font-size($custom-select-font-size-sm);
|
|
220
274
|
}
|
|
221
275
|
|
|
222
276
|
.custom-select-lg {
|
|
223
277
|
height: $custom-select-height-lg;
|
|
224
|
-
padding-top: $custom-select-padding-y;
|
|
225
|
-
padding-bottom: $custom-select-padding-y;
|
|
226
|
-
|
|
278
|
+
padding-top: $custom-select-padding-y-lg;
|
|
279
|
+
padding-bottom: $custom-select-padding-y-lg;
|
|
280
|
+
padding-left: $custom-select-padding-x-lg;
|
|
281
|
+
@include font-size($custom-select-font-size-lg);
|
|
227
282
|
}
|
|
228
283
|
|
|
229
284
|
|
|
@@ -247,13 +302,13 @@
|
|
|
247
302
|
margin: 0;
|
|
248
303
|
opacity: 0;
|
|
249
304
|
|
|
250
|
-
&:focus ~ .custom-file-
|
|
305
|
+
&:focus ~ .custom-file-label {
|
|
251
306
|
border-color: $custom-file-focus-border-color;
|
|
252
307
|
box-shadow: $custom-file-focus-box-shadow;
|
|
308
|
+
}
|
|
253
309
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}
|
|
310
|
+
&:disabled ~ .custom-file-label {
|
|
311
|
+
background-color: $custom-file-disabled-bg;
|
|
257
312
|
}
|
|
258
313
|
|
|
259
314
|
@each $lang, $value in $custom-file-text {
|
|
@@ -261,6 +316,10 @@
|
|
|
261
316
|
content: $value;
|
|
262
317
|
}
|
|
263
318
|
}
|
|
319
|
+
|
|
320
|
+
~ .custom-file-label[data-browse]::after {
|
|
321
|
+
content: attr(data-browse);
|
|
322
|
+
}
|
|
264
323
|
}
|
|
265
324
|
|
|
266
325
|
.custom-file-label {
|
|
@@ -271,6 +330,8 @@
|
|
|
271
330
|
z-index: 1;
|
|
272
331
|
height: $custom-file-height;
|
|
273
332
|
padding: $custom-file-padding-y $custom-file-padding-x;
|
|
333
|
+
font-family: $custom-file-font-family;
|
|
334
|
+
font-weight: $custom-file-font-weight;
|
|
274
335
|
line-height: $custom-file-line-height;
|
|
275
336
|
color: $custom-file-color;
|
|
276
337
|
background-color: $custom-file-bg;
|
|
@@ -285,13 +346,162 @@
|
|
|
285
346
|
bottom: 0;
|
|
286
347
|
z-index: 3;
|
|
287
348
|
display: block;
|
|
288
|
-
height:
|
|
349
|
+
height: $custom-file-height-inner;
|
|
289
350
|
padding: $custom-file-padding-y $custom-file-padding-x;
|
|
290
351
|
line-height: $custom-file-line-height;
|
|
291
352
|
color: $custom-file-button-color;
|
|
292
353
|
content: "Browse";
|
|
293
354
|
@include gradient-bg($custom-file-button-bg);
|
|
294
|
-
border-left:
|
|
355
|
+
border-left: inherit;
|
|
295
356
|
@include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0);
|
|
296
357
|
}
|
|
297
358
|
}
|
|
359
|
+
|
|
360
|
+
// Range
|
|
361
|
+
//
|
|
362
|
+
// Style range inputs the same across browsers. Vendor-specific rules for pseudo
|
|
363
|
+
// elements cannot be mixed. As such, there are no shared styles for focus or
|
|
364
|
+
// active states on prefixed selectors.
|
|
365
|
+
|
|
366
|
+
.custom-range {
|
|
367
|
+
width: 100%;
|
|
368
|
+
height: calc(#{$custom-range-thumb-height} + #{$custom-range-thumb-focus-box-shadow-width * 2});
|
|
369
|
+
padding: 0; // Need to reset padding
|
|
370
|
+
background-color: transparent;
|
|
371
|
+
appearance: none;
|
|
372
|
+
|
|
373
|
+
&:focus {
|
|
374
|
+
outline: none;
|
|
375
|
+
|
|
376
|
+
// Pseudo-elements must be split across multiple rulesets to have an effect.
|
|
377
|
+
// No box-shadow() mixin for focus accessibility.
|
|
378
|
+
&::-webkit-slider-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
|
|
379
|
+
&::-moz-range-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
|
|
380
|
+
&::-ms-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
&::-moz-focus-outer {
|
|
384
|
+
border: 0;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
&::-webkit-slider-thumb {
|
|
388
|
+
width: $custom-range-thumb-width;
|
|
389
|
+
height: $custom-range-thumb-height;
|
|
390
|
+
margin-top: ($custom-range-track-height - $custom-range-thumb-height) / 2; // Webkit specific
|
|
391
|
+
@include gradient-bg($custom-range-thumb-bg);
|
|
392
|
+
border: $custom-range-thumb-border;
|
|
393
|
+
@include border-radius($custom-range-thumb-border-radius);
|
|
394
|
+
@include box-shadow($custom-range-thumb-box-shadow);
|
|
395
|
+
@include transition($custom-forms-transition);
|
|
396
|
+
appearance: none;
|
|
397
|
+
|
|
398
|
+
&:active {
|
|
399
|
+
@include gradient-bg($custom-range-thumb-active-bg);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
&::-webkit-slider-runnable-track {
|
|
404
|
+
width: $custom-range-track-width;
|
|
405
|
+
height: $custom-range-track-height;
|
|
406
|
+
color: transparent; // Why?
|
|
407
|
+
cursor: $custom-range-track-cursor;
|
|
408
|
+
background-color: $custom-range-track-bg;
|
|
409
|
+
border-color: transparent;
|
|
410
|
+
@include border-radius($custom-range-track-border-radius);
|
|
411
|
+
@include box-shadow($custom-range-track-box-shadow);
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
&::-moz-range-thumb {
|
|
415
|
+
width: $custom-range-thumb-width;
|
|
416
|
+
height: $custom-range-thumb-height;
|
|
417
|
+
@include gradient-bg($custom-range-thumb-bg);
|
|
418
|
+
border: $custom-range-thumb-border;
|
|
419
|
+
@include border-radius($custom-range-thumb-border-radius);
|
|
420
|
+
@include box-shadow($custom-range-thumb-box-shadow);
|
|
421
|
+
@include transition($custom-forms-transition);
|
|
422
|
+
appearance: none;
|
|
423
|
+
|
|
424
|
+
&:active {
|
|
425
|
+
@include gradient-bg($custom-range-thumb-active-bg);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
&::-moz-range-track {
|
|
430
|
+
width: $custom-range-track-width;
|
|
431
|
+
height: $custom-range-track-height;
|
|
432
|
+
color: transparent;
|
|
433
|
+
cursor: $custom-range-track-cursor;
|
|
434
|
+
background-color: $custom-range-track-bg;
|
|
435
|
+
border-color: transparent; // Firefox specific?
|
|
436
|
+
@include border-radius($custom-range-track-border-radius);
|
|
437
|
+
@include box-shadow($custom-range-track-box-shadow);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
&::-ms-thumb {
|
|
441
|
+
width: $custom-range-thumb-width;
|
|
442
|
+
height: $custom-range-thumb-height;
|
|
443
|
+
margin-top: 0; // Edge specific
|
|
444
|
+
margin-right: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden.
|
|
445
|
+
margin-left: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden.
|
|
446
|
+
@include gradient-bg($custom-range-thumb-bg);
|
|
447
|
+
border: $custom-range-thumb-border;
|
|
448
|
+
@include border-radius($custom-range-thumb-border-radius);
|
|
449
|
+
@include box-shadow($custom-range-thumb-box-shadow);
|
|
450
|
+
@include transition($custom-forms-transition);
|
|
451
|
+
appearance: none;
|
|
452
|
+
|
|
453
|
+
&:active {
|
|
454
|
+
@include gradient-bg($custom-range-thumb-active-bg);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
&::-ms-track {
|
|
459
|
+
width: $custom-range-track-width;
|
|
460
|
+
height: $custom-range-track-height;
|
|
461
|
+
color: transparent;
|
|
462
|
+
cursor: $custom-range-track-cursor;
|
|
463
|
+
background-color: transparent;
|
|
464
|
+
border-color: transparent;
|
|
465
|
+
border-width: $custom-range-thumb-height / 2;
|
|
466
|
+
@include box-shadow($custom-range-track-box-shadow);
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
&::-ms-fill-lower {
|
|
470
|
+
background-color: $custom-range-track-bg;
|
|
471
|
+
@include border-radius($custom-range-track-border-radius);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
&::-ms-fill-upper {
|
|
475
|
+
margin-right: 15px; // arbitrary?
|
|
476
|
+
background-color: $custom-range-track-bg;
|
|
477
|
+
@include border-radius($custom-range-track-border-radius);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
&:disabled {
|
|
481
|
+
&::-webkit-slider-thumb {
|
|
482
|
+
background-color: $custom-range-thumb-disabled-bg;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
&::-webkit-slider-runnable-track {
|
|
486
|
+
cursor: default;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
&::-moz-range-thumb {
|
|
490
|
+
background-color: $custom-range-thumb-disabled-bg;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
&::-moz-range-track {
|
|
494
|
+
cursor: default;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
&::-ms-thumb {
|
|
498
|
+
background-color: $custom-range-thumb-disabled-bg;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.custom-control-label::before,
|
|
504
|
+
.custom-file-label,
|
|
505
|
+
.custom-select {
|
|
506
|
+
@include transition($custom-forms-transition);
|
|
507
|
+
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
// The dropdown wrapper (`<div>`)
|
|
2
2
|
.dropup,
|
|
3
|
-
.
|
|
3
|
+
.dropright,
|
|
4
|
+
.dropdown,
|
|
5
|
+
.dropleft {
|
|
4
6
|
position: relative;
|
|
5
7
|
}
|
|
6
8
|
|
|
7
9
|
.dropdown-toggle {
|
|
10
|
+
white-space: nowrap;
|
|
11
|
+
|
|
8
12
|
// Generate the caret automatically
|
|
9
13
|
@include caret;
|
|
10
14
|
}
|
|
@@ -20,8 +24,8 @@
|
|
|
20
24
|
min-width: $dropdown-min-width;
|
|
21
25
|
padding: $dropdown-padding-y 0;
|
|
22
26
|
margin: $dropdown-spacer 0 0; // override default ul
|
|
23
|
-
font-size
|
|
24
|
-
color: $
|
|
27
|
+
@include font-size($dropdown-font-size);
|
|
28
|
+
color: $dropdown-color;
|
|
25
29
|
text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
|
|
26
30
|
list-style: none;
|
|
27
31
|
background-color: $dropdown-bg;
|
|
@@ -31,10 +35,28 @@
|
|
|
31
35
|
@include box-shadow($dropdown-box-shadow);
|
|
32
36
|
}
|
|
33
37
|
|
|
38
|
+
@each $breakpoint in map-keys($grid-breakpoints) {
|
|
39
|
+
@include media-breakpoint-up($breakpoint) {
|
|
40
|
+
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
|
41
|
+
|
|
42
|
+
.dropdown-menu#{$infix}-left {
|
|
43
|
+
right: auto;
|
|
44
|
+
left: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.dropdown-menu#{$infix}-right {
|
|
48
|
+
right: 0;
|
|
49
|
+
left: auto;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
34
54
|
// Allow for dropdowns to go bottom up (aka, dropup-menu)
|
|
35
55
|
// Just add .dropup after the standard .dropdown class and you're set.
|
|
36
56
|
.dropup {
|
|
37
57
|
.dropdown-menu {
|
|
58
|
+
top: auto;
|
|
59
|
+
bottom: 100%;
|
|
38
60
|
margin-top: 0;
|
|
39
61
|
margin-bottom: $dropdown-spacer;
|
|
40
62
|
}
|
|
@@ -46,6 +68,9 @@
|
|
|
46
68
|
|
|
47
69
|
.dropright {
|
|
48
70
|
.dropdown-menu {
|
|
71
|
+
top: 0;
|
|
72
|
+
right: auto;
|
|
73
|
+
left: 100%;
|
|
49
74
|
margin-top: 0;
|
|
50
75
|
margin-left: $dropdown-spacer;
|
|
51
76
|
}
|
|
@@ -60,6 +85,9 @@
|
|
|
60
85
|
|
|
61
86
|
.dropleft {
|
|
62
87
|
.dropdown-menu {
|
|
88
|
+
top: 0;
|
|
89
|
+
right: 100%;
|
|
90
|
+
left: auto;
|
|
63
91
|
margin-top: 0;
|
|
64
92
|
margin-right: $dropdown-spacer;
|
|
65
93
|
}
|
|
@@ -72,9 +100,21 @@
|
|
|
72
100
|
}
|
|
73
101
|
}
|
|
74
102
|
|
|
103
|
+
// When enabled Popper.js, reset 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
|
+
|
|
75
115
|
// Dividers (basically an `<hr>`) within the dropdown
|
|
76
116
|
.dropdown-divider {
|
|
77
|
-
@include nav-divider($dropdown-divider-bg);
|
|
117
|
+
@include nav-divider($dropdown-divider-bg, $dropdown-divider-margin-y);
|
|
78
118
|
}
|
|
79
119
|
|
|
80
120
|
// Links, buttons, and more within the dropdown menu
|
|
@@ -92,6 +132,18 @@
|
|
|
92
132
|
background-color: transparent; // For `<button>`s
|
|
93
133
|
border: 0; // For `<button>`s
|
|
94
134
|
|
|
135
|
+
// Prevent dropdown overflow if there's no padding
|
|
136
|
+
// See https://github.com/twbs/bootstrap/pull/27703
|
|
137
|
+
@if $dropdown-padding-y == 0 {
|
|
138
|
+
&:first-child {
|
|
139
|
+
@include border-top-radius($dropdown-inner-border-radius);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&:last-child {
|
|
143
|
+
@include border-bottom-radius($dropdown-inner-border-radius);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
95
147
|
@include hover-focus {
|
|
96
148
|
color: $dropdown-link-hover-color;
|
|
97
149
|
text-decoration: none;
|
|
@@ -108,6 +160,7 @@
|
|
|
108
160
|
&.disabled,
|
|
109
161
|
&:disabled {
|
|
110
162
|
color: $dropdown-link-disabled-color;
|
|
163
|
+
pointer-events: none;
|
|
111
164
|
background-color: transparent;
|
|
112
165
|
// Remove CSS gradients if they're enabled
|
|
113
166
|
@if $enable-gradients {
|
|
@@ -125,7 +178,14 @@
|
|
|
125
178
|
display: block;
|
|
126
179
|
padding: $dropdown-padding-y $dropdown-item-padding-x;
|
|
127
180
|
margin-bottom: 0; // for use with heading elements
|
|
128
|
-
font-size
|
|
181
|
+
@include font-size($font-size-sm);
|
|
129
182
|
color: $dropdown-header-color;
|
|
130
183
|
white-space: nowrap; // as with > li > a
|
|
131
184
|
}
|
|
185
|
+
|
|
186
|
+
// Dropdown text
|
|
187
|
+
.dropdown-item-text {
|
|
188
|
+
display: block;
|
|
189
|
+
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
|
|
190
|
+
color: $dropdown-link-color;
|
|
191
|
+
}
|