bootstrap 4.0.0 → 4.6.2.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 +15 -1
- data/CHANGELOG.md +4 -4
- data/README.md +8 -2
- data/Rakefile +18 -4
- data/assets/javascripts/bootstrap/alert.js +77 -66
- data/assets/javascripts/bootstrap/button.js +138 -76
- data/assets/javascripts/bootstrap/carousel.js +289 -152
- data/assets/javascripts/bootstrap/collapse.js +150 -128
- data/assets/javascripts/bootstrap/dropdown.js +249 -160
- data/assets/javascripts/bootstrap/modal.js +280 -199
- data/assets/javascripts/bootstrap/popover.js +99 -58
- data/assets/javascripts/bootstrap/scrollspy.js +123 -102
- data/assets/javascripts/bootstrap/tab.js +110 -98
- data/assets/javascripts/bootstrap/toast.js +267 -0
- data/assets/javascripts/bootstrap/tooltip.js +401 -183
- data/assets/javascripts/bootstrap/util.js +106 -55
- data/assets/javascripts/bootstrap-sprockets.js +7 -6
- data/assets/javascripts/bootstrap.js +1903 -1441
- data/assets/javascripts/bootstrap.min.js +4 -4
- data/assets/stylesheets/_bootstrap-grid.scss +6 -8
- data/assets/stylesheets/_bootstrap-reboot.scss +4 -4
- data/assets/stylesheets/_bootstrap.scss +6 -4
- data/assets/stylesheets/bootstrap/_alert.scss +2 -1
- data/assets/stylesheets/bootstrap/_badge.scss +8 -1
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +10 -6
- data/assets/stylesheets/bootstrap/_button-group.scss +17 -20
- data/assets/stylesheets/bootstrap/_buttons.scss +20 -21
- data/assets/stylesheets/bootstrap/_card.scss +77 -61
- data/assets/stylesheets/bootstrap/_carousel.scss +72 -63
- data/assets/stylesheets/bootstrap/_close.scss +14 -8
- data/assets/stylesheets/bootstrap/_code.scss +6 -14
- data/assets/stylesheets/bootstrap/_custom-forms.scss +274 -45
- data/assets/stylesheets/bootstrap/_dropdown.scss +70 -9
- data/assets/stylesheets/bootstrap/_forms.scss +56 -42
- data/assets/stylesheets/bootstrap/_functions.scss +117 -13
- data/assets/stylesheets/bootstrap/_grid.scss +32 -11
- data/assets/stylesheets/bootstrap/_images.scss +4 -4
- data/assets/stylesheets/bootstrap/_input-group.scss +68 -16
- data/assets/stylesheets/bootstrap/_jumbotron.scss +2 -1
- data/assets/stylesheets/bootstrap/_list-group.scss +63 -24
- data/assets/stylesheets/bootstrap/_mixins.scss +9 -4
- data/assets/stylesheets/bootstrap/_modal.scss +96 -24
- data/assets/stylesheets/bootstrap/_nav.scss +14 -7
- data/assets/stylesheets/bootstrap/_navbar.scss +64 -43
- data/assets/stylesheets/bootstrap/_pagination.scss +7 -10
- data/assets/stylesheets/bootstrap/_popover.scss +55 -68
- data/assets/stylesheets/bootstrap/_print.scss +24 -16
- data/assets/stylesheets/bootstrap/_progress.scss +20 -6
- data/assets/stylesheets/bootstrap/_reboot.scss +88 -86
- data/assets/stylesheets/bootstrap/_spinners.scss +65 -0
- data/assets/stylesheets/bootstrap/_tables.scss +19 -14
- data/assets/stylesheets/bootstrap/_toasts.scss +46 -0
- data/assets/stylesheets/bootstrap/_tooltip.scss +5 -5
- data/assets/stylesheets/bootstrap/_transitions.scss +10 -20
- data/assets/stylesheets/bootstrap/_type.scss +19 -19
- data/assets/stylesheets/bootstrap/_utilities.scss +4 -0
- data/assets/stylesheets/bootstrap/_variables.scss +462 -207
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +5 -3
- data/assets/stylesheets/bootstrap/mixins/_badge.scss +8 -3
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +51 -10
- 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 +20 -19
- data/assets/stylesheets/bootstrap/mixins/_caret.scss +13 -16
- data/assets/stylesheets/bootstrap/mixins/_deprecate.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_float.scss +6 -3
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +96 -38
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +7 -7
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +31 -18
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +34 -17
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +7 -9
- data/assets/stylesheets/bootstrap/mixins/_image.scss +4 -4
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -2
- data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +3 -2
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +3 -3
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +5 -6
- data/assets/stylesheets/bootstrap/mixins/_size.scss +1 -0
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +11 -2
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +7 -4
- data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +3 -1
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +20 -3
- data/assets/stylesheets/bootstrap/mixins/_visibility.scss +1 -0
- data/assets/stylesheets/bootstrap/utilities/_background.scss +2 -2
- 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/_interactions.scss +5 -0
- 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 +28 -8
- data/assets/stylesheets/bootstrap/utilities/_visibility.scss +4 -2
- data/assets/stylesheets/bootstrap/vendor/_rfs.scss +228 -0
- data/bootstrap.gemspec +5 -4
- data/lib/bootstrap/engine.rb +19 -0
- data/lib/bootstrap/version.rb +4 -2
- data/lib/bootstrap.rb +10 -7
- data/tasks/updater/js.rb +18 -6
- data/tasks/updater/network.rb +8 -2
- data/test/dummy_rails/app/assets/config/manifest.js +3 -0
- data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
- data/test/gemfiles/rails_6_0.gemfile +7 -0
- data/test/gemfiles/rails_7_0_dartsass.gemfile +8 -0
- data/test/gemfiles/rails_7_0_sassc.gemfile +8 -0
- data/test/support/dummy_rails_integration.rb +3 -1
- data/test/test_helper.rb +21 -15
- metadata +28 -25
- data/assets/stylesheets/bootstrap/mixins/_navbar-align.scss +0 -10
|
@@ -9,9 +9,11 @@
|
|
|
9
9
|
|
|
10
10
|
.custom-control {
|
|
11
11
|
position: relative;
|
|
12
|
+
z-index: 1;
|
|
12
13
|
display: block;
|
|
13
|
-
min-height:
|
|
14
|
-
padding-left: $custom-control-gutter;
|
|
14
|
+
min-height: $font-size-base * $line-height-base;
|
|
15
|
+
padding-left: $custom-control-gutter + $custom-control-indicator-size;
|
|
16
|
+
print-color-adjust: exact; // Keep themed appearance for print
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
.custom-control-inline {
|
|
@@ -21,26 +23,41 @@
|
|
|
21
23
|
|
|
22
24
|
.custom-control-input {
|
|
23
25
|
position: absolute;
|
|
26
|
+
left: 0;
|
|
24
27
|
z-index: -1; // Put the input behind the label so it doesn't overlay text
|
|
28
|
+
width: $custom-control-indicator-size;
|
|
29
|
+
height: ($font-size-base * $line-height-base + $custom-control-indicator-size) * .5;
|
|
25
30
|
opacity: 0;
|
|
26
31
|
|
|
27
32
|
&:checked ~ .custom-control-label::before {
|
|
28
33
|
color: $custom-control-indicator-checked-color;
|
|
34
|
+
border-color: $custom-control-indicator-checked-border-color;
|
|
29
35
|
@include gradient-bg($custom-control-indicator-checked-bg);
|
|
30
36
|
@include box-shadow($custom-control-indicator-checked-box-shadow);
|
|
31
37
|
}
|
|
32
38
|
|
|
33
39
|
&:focus ~ .custom-control-label::before {
|
|
34
40
|
// the mixin is not used here to make sure there is feedback
|
|
35
|
-
|
|
41
|
+
@if $enable-shadows {
|
|
42
|
+
box-shadow: $input-box-shadow, $custom-control-indicator-focus-box-shadow;
|
|
43
|
+
} @else {
|
|
44
|
+
box-shadow: $custom-control-indicator-focus-box-shadow;
|
|
45
|
+
}
|
|
36
46
|
}
|
|
37
47
|
|
|
38
|
-
&:
|
|
48
|
+
&:focus:not(:checked) ~ .custom-control-label::before {
|
|
49
|
+
border-color: $custom-control-indicator-focus-border-color;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&:not(:disabled):active ~ .custom-control-label::before {
|
|
39
53
|
color: $custom-control-indicator-active-color;
|
|
40
54
|
background-color: $custom-control-indicator-active-bg;
|
|
55
|
+
border-color: $custom-control-indicator-active-border-color;
|
|
41
56
|
@include box-shadow($custom-control-indicator-active-box-shadow);
|
|
42
57
|
}
|
|
43
58
|
|
|
59
|
+
// Use [disabled] and :disabled to work around https://github.com/twbs/bootstrap/issues/28247
|
|
60
|
+
&[disabled],
|
|
44
61
|
&:disabled {
|
|
45
62
|
~ .custom-control-label {
|
|
46
63
|
color: $custom-control-label-disabled-color;
|
|
@@ -54,38 +71,40 @@
|
|
|
54
71
|
|
|
55
72
|
// Custom control indicators
|
|
56
73
|
//
|
|
57
|
-
// Build the custom controls out of
|
|
74
|
+
// Build the custom controls out of pseudo-elements.
|
|
58
75
|
|
|
59
76
|
.custom-control-label {
|
|
77
|
+
position: relative;
|
|
60
78
|
margin-bottom: 0;
|
|
79
|
+
color: $custom-control-label-color;
|
|
80
|
+
vertical-align: top;
|
|
81
|
+
cursor: $custom-control-cursor;
|
|
61
82
|
|
|
62
83
|
// Background-color and (when enabled) gradient
|
|
63
84
|
&::before {
|
|
64
85
|
position: absolute;
|
|
65
|
-
top: (
|
|
66
|
-
left:
|
|
86
|
+
top: ($font-size-base * $line-height-base - $custom-control-indicator-size) * .5;
|
|
87
|
+
left: -($custom-control-gutter + $custom-control-indicator-size);
|
|
67
88
|
display: block;
|
|
68
89
|
width: $custom-control-indicator-size;
|
|
69
90
|
height: $custom-control-indicator-size;
|
|
70
91
|
pointer-events: none;
|
|
71
92
|
content: "";
|
|
72
|
-
user-select: none;
|
|
73
93
|
background-color: $custom-control-indicator-bg;
|
|
94
|
+
border: $custom-control-indicator-border-width solid $custom-control-indicator-border-color;
|
|
74
95
|
@include box-shadow($custom-control-indicator-box-shadow);
|
|
75
96
|
}
|
|
76
97
|
|
|
77
98
|
// Foreground (icon)
|
|
78
99
|
&::after {
|
|
79
100
|
position: absolute;
|
|
80
|
-
top: (
|
|
81
|
-
left:
|
|
101
|
+
top: ($font-size-base * $line-height-base - $custom-control-indicator-size) * .5;
|
|
102
|
+
left: -($custom-control-gutter + $custom-control-indicator-size);
|
|
82
103
|
display: block;
|
|
83
104
|
width: $custom-control-indicator-size;
|
|
84
105
|
height: $custom-control-indicator-size;
|
|
85
106
|
content: "";
|
|
86
|
-
background
|
|
87
|
-
background-position: center center;
|
|
88
|
-
background-size: $custom-control-indicator-bg-size;
|
|
107
|
+
background: 50% / #{$custom-control-indicator-bg-size} no-repeat;
|
|
89
108
|
}
|
|
90
109
|
}
|
|
91
110
|
|
|
@@ -100,30 +119,28 @@
|
|
|
100
119
|
}
|
|
101
120
|
|
|
102
121
|
.custom-control-input:checked ~ .custom-control-label {
|
|
103
|
-
&::before {
|
|
104
|
-
@include gradient-bg($custom-control-indicator-checked-bg);
|
|
105
|
-
}
|
|
106
122
|
&::after {
|
|
107
|
-
background-image: $custom-checkbox-indicator-icon-checked;
|
|
123
|
+
background-image: escape-svg($custom-checkbox-indicator-icon-checked);
|
|
108
124
|
}
|
|
109
125
|
}
|
|
110
126
|
|
|
111
127
|
.custom-control-input:indeterminate ~ .custom-control-label {
|
|
112
128
|
&::before {
|
|
129
|
+
border-color: $custom-checkbox-indicator-indeterminate-border-color;
|
|
113
130
|
@include gradient-bg($custom-checkbox-indicator-indeterminate-bg);
|
|
114
131
|
@include box-shadow($custom-checkbox-indicator-indeterminate-box-shadow);
|
|
115
132
|
}
|
|
116
133
|
&::after {
|
|
117
|
-
background-image: $custom-checkbox-indicator-icon-indeterminate;
|
|
134
|
+
background-image: escape-svg($custom-checkbox-indicator-icon-indeterminate);
|
|
118
135
|
}
|
|
119
136
|
}
|
|
120
137
|
|
|
121
138
|
.custom-control-input:disabled {
|
|
122
139
|
&:checked ~ .custom-control-label::before {
|
|
123
|
-
|
|
140
|
+
@include gradient-bg($custom-control-indicator-checked-disabled-bg);
|
|
124
141
|
}
|
|
125
142
|
&:indeterminate ~ .custom-control-label::before {
|
|
126
|
-
|
|
143
|
+
@include gradient-bg($custom-control-indicator-checked-disabled-bg);
|
|
127
144
|
}
|
|
128
145
|
}
|
|
129
146
|
}
|
|
@@ -134,21 +151,62 @@
|
|
|
134
151
|
|
|
135
152
|
.custom-radio {
|
|
136
153
|
.custom-control-label::before {
|
|
154
|
+
// stylelint-disable-next-line property-disallowed-list
|
|
137
155
|
border-radius: $custom-radio-indicator-border-radius;
|
|
138
156
|
}
|
|
139
157
|
|
|
140
158
|
.custom-control-input:checked ~ .custom-control-label {
|
|
159
|
+
&::after {
|
|
160
|
+
background-image: escape-svg($custom-radio-indicator-icon-checked);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.custom-control-input:disabled {
|
|
165
|
+
&:checked ~ .custom-control-label::before {
|
|
166
|
+
@include gradient-bg($custom-control-indicator-checked-disabled-bg);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
// switches
|
|
173
|
+
//
|
|
174
|
+
// Tweak a few things for switches
|
|
175
|
+
|
|
176
|
+
.custom-switch {
|
|
177
|
+
padding-left: $custom-switch-width + $custom-control-gutter;
|
|
178
|
+
|
|
179
|
+
.custom-control-label {
|
|
141
180
|
&::before {
|
|
142
|
-
|
|
181
|
+
left: -($custom-switch-width + $custom-control-gutter);
|
|
182
|
+
width: $custom-switch-width;
|
|
183
|
+
pointer-events: all;
|
|
184
|
+
// stylelint-disable-next-line property-disallowed-list
|
|
185
|
+
border-radius: $custom-switch-indicator-border-radius;
|
|
143
186
|
}
|
|
187
|
+
|
|
144
188
|
&::after {
|
|
145
|
-
|
|
189
|
+
top: add(($font-size-base * $line-height-base - $custom-control-indicator-size) * .5, $custom-control-indicator-border-width * 2);
|
|
190
|
+
left: add(-($custom-switch-width + $custom-control-gutter), $custom-control-indicator-border-width * 2);
|
|
191
|
+
width: $custom-switch-indicator-size;
|
|
192
|
+
height: $custom-switch-indicator-size;
|
|
193
|
+
background-color: $custom-control-indicator-border-color;
|
|
194
|
+
// stylelint-disable-next-line property-disallowed-list
|
|
195
|
+
border-radius: $custom-switch-indicator-border-radius;
|
|
196
|
+
@include transition(transform .15s ease-in-out, $custom-forms-transition);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.custom-control-input:checked ~ .custom-control-label {
|
|
201
|
+
&::after {
|
|
202
|
+
background-color: $custom-control-indicator-bg;
|
|
203
|
+
transform: translateX($custom-switch-width - $custom-control-indicator-size);
|
|
146
204
|
}
|
|
147
205
|
}
|
|
148
206
|
|
|
149
207
|
.custom-control-input:disabled {
|
|
150
208
|
&:checked ~ .custom-control-label::before {
|
|
151
|
-
|
|
209
|
+
@include gradient-bg($custom-control-indicator-checked-disabled-bg);
|
|
152
210
|
}
|
|
153
211
|
}
|
|
154
212
|
}
|
|
@@ -157,7 +215,7 @@
|
|
|
157
215
|
// Select
|
|
158
216
|
//
|
|
159
217
|
// Replaces the browser default select with a custom one, mostly pulled from
|
|
160
|
-
//
|
|
218
|
+
// https://primer.github.io/.
|
|
161
219
|
//
|
|
162
220
|
|
|
163
221
|
.custom-select {
|
|
@@ -165,23 +223,27 @@
|
|
|
165
223
|
width: 100%;
|
|
166
224
|
height: $custom-select-height;
|
|
167
225
|
padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x;
|
|
226
|
+
font-family: $custom-select-font-family;
|
|
227
|
+
@include font-size($custom-select-font-size);
|
|
228
|
+
font-weight: $custom-select-font-weight;
|
|
168
229
|
line-height: $custom-select-line-height;
|
|
169
230
|
color: $custom-select-color;
|
|
170
231
|
vertical-align: middle;
|
|
171
|
-
background: $custom-select-bg $custom-select-
|
|
172
|
-
background-size: $custom-select-bg-size;
|
|
232
|
+
background: $custom-select-bg $custom-select-background;
|
|
173
233
|
border: $custom-select-border-width solid $custom-select-border-color;
|
|
174
|
-
@
|
|
175
|
-
|
|
176
|
-
} @else {
|
|
177
|
-
border-radius: 0;
|
|
178
|
-
}
|
|
234
|
+
@include border-radius($custom-select-border-radius, 0);
|
|
235
|
+
@include box-shadow($custom-select-box-shadow);
|
|
179
236
|
appearance: none;
|
|
180
237
|
|
|
181
238
|
&:focus {
|
|
182
239
|
border-color: $custom-select-focus-border-color;
|
|
183
240
|
outline: 0;
|
|
184
|
-
|
|
241
|
+
@if $enable-shadows {
|
|
242
|
+
@include box-shadow($custom-select-box-shadow, $custom-select-focus-box-shadow);
|
|
243
|
+
} @else {
|
|
244
|
+
// Avoid using mixin so we can pass custom focus shadow properly
|
|
245
|
+
box-shadow: $custom-select-focus-box-shadow;
|
|
246
|
+
}
|
|
185
247
|
|
|
186
248
|
&::-ms-value {
|
|
187
249
|
// For visual consistency with other platforms/browsers,
|
|
@@ -208,22 +270,30 @@
|
|
|
208
270
|
|
|
209
271
|
// Hides the default caret in IE11
|
|
210
272
|
&::-ms-expand {
|
|
211
|
-
|
|
273
|
+
display: none;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// Remove outline from select box in FF
|
|
277
|
+
&:-moz-focusring {
|
|
278
|
+
color: transparent;
|
|
279
|
+
text-shadow: 0 0 0 $custom-select-color;
|
|
212
280
|
}
|
|
213
281
|
}
|
|
214
282
|
|
|
215
283
|
.custom-select-sm {
|
|
216
284
|
height: $custom-select-height-sm;
|
|
217
|
-
padding-top: $custom-select-padding-y;
|
|
218
|
-
padding-bottom: $custom-select-padding-y;
|
|
219
|
-
|
|
285
|
+
padding-top: $custom-select-padding-y-sm;
|
|
286
|
+
padding-bottom: $custom-select-padding-y-sm;
|
|
287
|
+
padding-left: $custom-select-padding-x-sm;
|
|
288
|
+
@include font-size($custom-select-font-size-sm);
|
|
220
289
|
}
|
|
221
290
|
|
|
222
291
|
.custom-select-lg {
|
|
223
292
|
height: $custom-select-height-lg;
|
|
224
|
-
padding-top: $custom-select-padding-y;
|
|
225
|
-
padding-bottom: $custom-select-padding-y;
|
|
226
|
-
|
|
293
|
+
padding-top: $custom-select-padding-y-lg;
|
|
294
|
+
padding-bottom: $custom-select-padding-y-lg;
|
|
295
|
+
padding-left: $custom-select-padding-x-lg;
|
|
296
|
+
@include font-size($custom-select-font-size-lg);
|
|
227
297
|
}
|
|
228
298
|
|
|
229
299
|
|
|
@@ -245,15 +315,18 @@
|
|
|
245
315
|
width: 100%;
|
|
246
316
|
height: $custom-file-height;
|
|
247
317
|
margin: 0;
|
|
318
|
+
overflow: hidden;
|
|
248
319
|
opacity: 0;
|
|
249
320
|
|
|
250
|
-
&:focus ~ .custom-file-
|
|
321
|
+
&:focus ~ .custom-file-label {
|
|
251
322
|
border-color: $custom-file-focus-border-color;
|
|
252
323
|
box-shadow: $custom-file-focus-box-shadow;
|
|
324
|
+
}
|
|
253
325
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
326
|
+
// Use [disabled] and :disabled to work around https://github.com/twbs/bootstrap/issues/28247
|
|
327
|
+
&[disabled] ~ .custom-file-label,
|
|
328
|
+
&:disabled ~ .custom-file-label {
|
|
329
|
+
background-color: $custom-file-disabled-bg;
|
|
257
330
|
}
|
|
258
331
|
|
|
259
332
|
@each $lang, $value in $custom-file-text {
|
|
@@ -261,6 +334,10 @@
|
|
|
261
334
|
content: $value;
|
|
262
335
|
}
|
|
263
336
|
}
|
|
337
|
+
|
|
338
|
+
~ .custom-file-label[data-browse]::after {
|
|
339
|
+
content: attr(data-browse);
|
|
340
|
+
}
|
|
264
341
|
}
|
|
265
342
|
|
|
266
343
|
.custom-file-label {
|
|
@@ -271,6 +348,9 @@
|
|
|
271
348
|
z-index: 1;
|
|
272
349
|
height: $custom-file-height;
|
|
273
350
|
padding: $custom-file-padding-y $custom-file-padding-x;
|
|
351
|
+
overflow: hidden;
|
|
352
|
+
font-family: $custom-file-font-family;
|
|
353
|
+
font-weight: $custom-file-font-weight;
|
|
274
354
|
line-height: $custom-file-line-height;
|
|
275
355
|
color: $custom-file-color;
|
|
276
356
|
background-color: $custom-file-bg;
|
|
@@ -285,13 +365,162 @@
|
|
|
285
365
|
bottom: 0;
|
|
286
366
|
z-index: 3;
|
|
287
367
|
display: block;
|
|
288
|
-
height:
|
|
368
|
+
height: $custom-file-height-inner;
|
|
289
369
|
padding: $custom-file-padding-y $custom-file-padding-x;
|
|
290
370
|
line-height: $custom-file-line-height;
|
|
291
371
|
color: $custom-file-button-color;
|
|
292
372
|
content: "Browse";
|
|
293
373
|
@include gradient-bg($custom-file-button-bg);
|
|
294
|
-
border-left:
|
|
374
|
+
border-left: inherit;
|
|
295
375
|
@include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0);
|
|
296
376
|
}
|
|
297
377
|
}
|
|
378
|
+
|
|
379
|
+
// Range
|
|
380
|
+
//
|
|
381
|
+
// Style range inputs the same across browsers. Vendor-specific rules for pseudo
|
|
382
|
+
// elements cannot be mixed. As such, there are no shared styles for focus or
|
|
383
|
+
// active states on prefixed selectors.
|
|
384
|
+
|
|
385
|
+
.custom-range {
|
|
386
|
+
width: 100%;
|
|
387
|
+
height: add($custom-range-thumb-height, $custom-range-thumb-focus-box-shadow-width * 2);
|
|
388
|
+
padding: 0; // Need to reset padding
|
|
389
|
+
background-color: transparent;
|
|
390
|
+
appearance: none;
|
|
391
|
+
|
|
392
|
+
&:focus {
|
|
393
|
+
outline: 0;
|
|
394
|
+
|
|
395
|
+
// Pseudo-elements must be split across multiple rulesets to have an effect.
|
|
396
|
+
// No box-shadow() mixin for focus accessibility.
|
|
397
|
+
&::-webkit-slider-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
|
|
398
|
+
&::-moz-range-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
|
|
399
|
+
&::-ms-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
&::-moz-focus-outer {
|
|
403
|
+
border: 0;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
&::-webkit-slider-thumb {
|
|
407
|
+
width: $custom-range-thumb-width;
|
|
408
|
+
height: $custom-range-thumb-height;
|
|
409
|
+
margin-top: ($custom-range-track-height - $custom-range-thumb-height) * .5; // Webkit specific
|
|
410
|
+
@include gradient-bg($custom-range-thumb-bg);
|
|
411
|
+
border: $custom-range-thumb-border;
|
|
412
|
+
@include border-radius($custom-range-thumb-border-radius);
|
|
413
|
+
@include box-shadow($custom-range-thumb-box-shadow);
|
|
414
|
+
@include transition($custom-forms-transition);
|
|
415
|
+
appearance: none;
|
|
416
|
+
|
|
417
|
+
&:active {
|
|
418
|
+
@include gradient-bg($custom-range-thumb-active-bg);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
&::-webkit-slider-runnable-track {
|
|
423
|
+
width: $custom-range-track-width;
|
|
424
|
+
height: $custom-range-track-height;
|
|
425
|
+
color: transparent; // Why?
|
|
426
|
+
cursor: $custom-range-track-cursor;
|
|
427
|
+
background-color: $custom-range-track-bg;
|
|
428
|
+
border-color: transparent;
|
|
429
|
+
@include border-radius($custom-range-track-border-radius);
|
|
430
|
+
@include box-shadow($custom-range-track-box-shadow);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
&::-moz-range-thumb {
|
|
434
|
+
width: $custom-range-thumb-width;
|
|
435
|
+
height: $custom-range-thumb-height;
|
|
436
|
+
@include gradient-bg($custom-range-thumb-bg);
|
|
437
|
+
border: $custom-range-thumb-border;
|
|
438
|
+
@include border-radius($custom-range-thumb-border-radius);
|
|
439
|
+
@include box-shadow($custom-range-thumb-box-shadow);
|
|
440
|
+
@include transition($custom-forms-transition);
|
|
441
|
+
appearance: none;
|
|
442
|
+
|
|
443
|
+
&:active {
|
|
444
|
+
@include gradient-bg($custom-range-thumb-active-bg);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
&::-moz-range-track {
|
|
449
|
+
width: $custom-range-track-width;
|
|
450
|
+
height: $custom-range-track-height;
|
|
451
|
+
color: transparent;
|
|
452
|
+
cursor: $custom-range-track-cursor;
|
|
453
|
+
background-color: $custom-range-track-bg;
|
|
454
|
+
border-color: transparent; // Firefox specific?
|
|
455
|
+
@include border-radius($custom-range-track-border-radius);
|
|
456
|
+
@include box-shadow($custom-range-track-box-shadow);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
&::-ms-thumb {
|
|
460
|
+
width: $custom-range-thumb-width;
|
|
461
|
+
height: $custom-range-thumb-height;
|
|
462
|
+
margin-top: 0; // Edge specific
|
|
463
|
+
margin-right: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden.
|
|
464
|
+
margin-left: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden.
|
|
465
|
+
@include gradient-bg($custom-range-thumb-bg);
|
|
466
|
+
border: $custom-range-thumb-border;
|
|
467
|
+
@include border-radius($custom-range-thumb-border-radius);
|
|
468
|
+
@include box-shadow($custom-range-thumb-box-shadow);
|
|
469
|
+
@include transition($custom-forms-transition);
|
|
470
|
+
appearance: none;
|
|
471
|
+
|
|
472
|
+
&:active {
|
|
473
|
+
@include gradient-bg($custom-range-thumb-active-bg);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
&::-ms-track {
|
|
478
|
+
width: $custom-range-track-width;
|
|
479
|
+
height: $custom-range-track-height;
|
|
480
|
+
color: transparent;
|
|
481
|
+
cursor: $custom-range-track-cursor;
|
|
482
|
+
background-color: transparent;
|
|
483
|
+
border-color: transparent;
|
|
484
|
+
border-width: $custom-range-thumb-height * .5;
|
|
485
|
+
@include box-shadow($custom-range-track-box-shadow);
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
&::-ms-fill-lower {
|
|
489
|
+
background-color: $custom-range-track-bg;
|
|
490
|
+
@include border-radius($custom-range-track-border-radius);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
&::-ms-fill-upper {
|
|
494
|
+
margin-right: 15px; // arbitrary?
|
|
495
|
+
background-color: $custom-range-track-bg;
|
|
496
|
+
@include border-radius($custom-range-track-border-radius);
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
&:disabled {
|
|
500
|
+
&::-webkit-slider-thumb {
|
|
501
|
+
background-color: $custom-range-thumb-disabled-bg;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
&::-webkit-slider-runnable-track {
|
|
505
|
+
cursor: default;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
&::-moz-range-thumb {
|
|
509
|
+
background-color: $custom-range-thumb-disabled-bg;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
&::-moz-range-track {
|
|
513
|
+
cursor: default;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
&::-ms-thumb {
|
|
517
|
+
background-color: $custom-range-thumb-disabled-bg;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.custom-control-label::before,
|
|
523
|
+
.custom-file-label,
|
|
524
|
+
.custom-select {
|
|
525
|
+
@include transition($custom-forms-transition);
|
|
526
|
+
}
|
|
@@ -1,12 +1,16 @@
|
|
|
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
|
-
@include caret;
|
|
13
|
+
@include caret();
|
|
10
14
|
}
|
|
11
15
|
|
|
12
16
|
// The dropdown menu
|
|
@@ -18,10 +22,10 @@
|
|
|
18
22
|
display: none; // none by default, but block on "open" of the menu
|
|
19
23
|
float: left;
|
|
20
24
|
min-width: $dropdown-min-width;
|
|
21
|
-
padding: $dropdown-padding-y
|
|
25
|
+
padding: $dropdown-padding-y $dropdown-padding-x;
|
|
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 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
|
+
|
|
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, true);
|
|
78
118
|
}
|
|
79
119
|
|
|
80
120
|
// Links, buttons, and more within the dropdown menu
|
|
@@ -88,11 +128,24 @@
|
|
|
88
128
|
font-weight: $font-weight-normal;
|
|
89
129
|
color: $dropdown-link-color;
|
|
90
130
|
text-align: inherit; // For `<button>`s
|
|
131
|
+
text-decoration: if($link-decoration == none, null, none);
|
|
91
132
|
white-space: nowrap; // prevent links from randomly breaking onto new lines
|
|
92
133
|
background-color: transparent; // For `<button>`s
|
|
93
134
|
border: 0; // For `<button>`s
|
|
94
135
|
|
|
95
|
-
|
|
136
|
+
// Prevent dropdown overflow if there's no padding
|
|
137
|
+
// See https://github.com/twbs/bootstrap/pull/27703
|
|
138
|
+
@if $dropdown-padding-y == 0 {
|
|
139
|
+
&:first-child {
|
|
140
|
+
@include border-top-radius($dropdown-inner-border-radius);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&:last-child {
|
|
144
|
+
@include border-bottom-radius($dropdown-inner-border-radius);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
@include hover-focus() {
|
|
96
149
|
color: $dropdown-link-hover-color;
|
|
97
150
|
text-decoration: none;
|
|
98
151
|
@include gradient-bg($dropdown-link-hover-bg);
|
|
@@ -108,6 +161,7 @@
|
|
|
108
161
|
&.disabled,
|
|
109
162
|
&:disabled {
|
|
110
163
|
color: $dropdown-link-disabled-color;
|
|
164
|
+
pointer-events: none;
|
|
111
165
|
background-color: transparent;
|
|
112
166
|
// Remove CSS gradients if they're enabled
|
|
113
167
|
@if $enable-gradients {
|
|
@@ -123,9 +177,16 @@
|
|
|
123
177
|
// Dropdown section headers
|
|
124
178
|
.dropdown-header {
|
|
125
179
|
display: block;
|
|
126
|
-
padding: $dropdown-
|
|
180
|
+
padding: $dropdown-header-padding;
|
|
127
181
|
margin-bottom: 0; // for use with heading elements
|
|
128
|
-
font-size
|
|
182
|
+
@include font-size($font-size-sm);
|
|
129
183
|
color: $dropdown-header-color;
|
|
130
184
|
white-space: nowrap; // as with > li > a
|
|
131
185
|
}
|
|
186
|
+
|
|
187
|
+
// Dropdown text
|
|
188
|
+
.dropdown-item-text {
|
|
189
|
+
display: block;
|
|
190
|
+
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
|
|
191
|
+
color: $dropdown-link-color;
|
|
192
|
+
}
|