bootstrap 4.0.0.beta3 → 4.6.2
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 +2 -2
- data/README.md +2 -2
- data/Rakefile +4 -2
- data/assets/javascripts/bootstrap/alert.js +79 -68
- data/assets/javascripts/bootstrap/button.js +140 -78
- data/assets/javascripts/bootstrap/carousel.js +294 -158
- data/assets/javascripts/bootstrap/collapse.js +157 -133
- data/assets/javascripts/bootstrap/dropdown.js +257 -167
- data/assets/javascripts/bootstrap/modal.js +285 -204
- data/assets/javascripts/bootstrap/popover.js +101 -60
- data/assets/javascripts/bootstrap/scrollspy.js +127 -106
- data/assets/javascripts/bootstrap/tab.js +113 -101
- data/assets/javascripts/bootstrap/toast.js +267 -0
- data/assets/javascripts/bootstrap/tooltip.js +406 -188
- data/assets/javascripts/bootstrap/util.js +106 -55
- data/assets/javascripts/bootstrap-sprockets.js +1 -0
- data/assets/javascripts/bootstrap.js +1946 -1482
- data/assets/javascripts/bootstrap.min.js +4 -4
- data/assets/stylesheets/_bootstrap-grid.scss +7 -12
- data/assets/stylesheets/_bootstrap-reboot.scss +4 -4
- data/assets/stylesheets/_bootstrap.scss +6 -4
- data/assets/stylesheets/bootstrap/_alert.scss +3 -2
- 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 +23 -28
- data/assets/stylesheets/bootstrap/_card.scss +77 -61
- data/assets/stylesheets/bootstrap/_carousel.scss +72 -63
- data/assets/stylesheets/bootstrap/_close.scss +15 -9
- data/assets/stylesheets/bootstrap/_code.scss +6 -14
- data/assets/stylesheets/bootstrap/_custom-forms.scss +287 -43
- 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 +80 -25
- 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 +66 -45
- data/assets/stylesheets/bootstrap/_pagination.scss +10 -8
- data/assets/stylesheets/bootstrap/_popover.scss +56 -69
- data/assets/stylesheets/bootstrap/_print.scss +41 -19
- data/assets/stylesheets/bootstrap/_progress.scss +20 -6
- data/assets/stylesheets/bootstrap/_reboot.scss +88 -109
- 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 +6 -6
- 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 +492 -215
- 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 +11 -9
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +35 -26
- 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 +102 -40
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +7 -7
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +36 -25
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +34 -17
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +27 -51
- data/assets/stylesheets/bootstrap/mixins/_image.scss +4 -4
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +10 -13
- 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 +23 -2
- data/assets/stylesheets/bootstrap/utilities/_display.scss +6 -36
- 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 +7 -4
- 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 +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/support/dummy_rails_integration.rb +3 -1
- data/test/test_helper.rb +21 -15
- metadata +29 -16
- data/assets/stylesheets/bootstrap/mixins/_navbar-align.scss +0 -10
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
// Inline and block code styles
|
|
2
|
-
code,
|
|
3
|
-
kbd,
|
|
4
|
-
pre,
|
|
5
|
-
samp {
|
|
6
|
-
font-family: $font-family-monospace;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
1
|
// Inline code
|
|
10
2
|
code {
|
|
11
|
-
font-size
|
|
3
|
+
@include font-size($code-font-size);
|
|
12
4
|
color: $code-color;
|
|
13
|
-
word-
|
|
5
|
+
word-wrap: break-word;
|
|
14
6
|
|
|
15
7
|
// Streamline the style when inside anchors to avoid broken underline and more
|
|
16
8
|
a > & {
|
|
@@ -21,7 +13,7 @@ code {
|
|
|
21
13
|
// User input typically entered via keyboard
|
|
22
14
|
kbd {
|
|
23
15
|
padding: $kbd-padding-y $kbd-padding-x;
|
|
24
|
-
font-size
|
|
16
|
+
@include font-size($kbd-font-size);
|
|
25
17
|
color: $kbd-color;
|
|
26
18
|
background-color: $kbd-bg;
|
|
27
19
|
@include border-radius($border-radius-sm);
|
|
@@ -29,7 +21,7 @@ kbd {
|
|
|
29
21
|
|
|
30
22
|
kbd {
|
|
31
23
|
padding: 0;
|
|
32
|
-
font-size
|
|
24
|
+
@include font-size(100%);
|
|
33
25
|
font-weight: $nested-kbd-font-weight;
|
|
34
26
|
@include box-shadow(none);
|
|
35
27
|
}
|
|
@@ -38,12 +30,12 @@ kbd {
|
|
|
38
30
|
// Blocks of code
|
|
39
31
|
pre {
|
|
40
32
|
display: block;
|
|
41
|
-
font-size
|
|
33
|
+
@include font-size($code-font-size);
|
|
42
34
|
color: $pre-color;
|
|
43
35
|
|
|
44
36
|
// Account for some code outputs that place code tags in pre tags
|
|
45
37
|
code {
|
|
46
|
-
font-size
|
|
38
|
+
@include font-size(inherit);
|
|
47
39
|
color: inherit;
|
|
48
40
|
word-break: normal;
|
|
49
41
|
}
|
|
@@ -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,21 +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);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.custom-control-input:disabled {
|
|
139
|
+
&:checked ~ .custom-control-label::before {
|
|
140
|
+
@include gradient-bg($custom-control-indicator-checked-disabled-bg);
|
|
141
|
+
}
|
|
142
|
+
&:indeterminate ~ .custom-control-label::before {
|
|
143
|
+
@include gradient-bg($custom-control-indicator-checked-disabled-bg);
|
|
118
144
|
}
|
|
119
145
|
}
|
|
120
146
|
}
|
|
@@ -125,15 +151,62 @@
|
|
|
125
151
|
|
|
126
152
|
.custom-radio {
|
|
127
153
|
.custom-control-label::before {
|
|
154
|
+
// stylelint-disable-next-line property-disallowed-list
|
|
128
155
|
border-radius: $custom-radio-indicator-border-radius;
|
|
129
156
|
}
|
|
130
157
|
|
|
131
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 {
|
|
132
180
|
&::before {
|
|
133
|
-
|
|
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;
|
|
134
186
|
}
|
|
187
|
+
|
|
135
188
|
&::after {
|
|
136
|
-
|
|
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);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.custom-control-input:disabled {
|
|
208
|
+
&:checked ~ .custom-control-label::before {
|
|
209
|
+
@include gradient-bg($custom-control-indicator-checked-disabled-bg);
|
|
137
210
|
}
|
|
138
211
|
}
|
|
139
212
|
}
|
|
@@ -142,31 +215,35 @@
|
|
|
142
215
|
// Select
|
|
143
216
|
//
|
|
144
217
|
// Replaces the browser default select with a custom one, mostly pulled from
|
|
145
|
-
//
|
|
218
|
+
// https://primer.github.io/.
|
|
146
219
|
//
|
|
147
220
|
|
|
148
221
|
.custom-select {
|
|
149
222
|
display: inline-block;
|
|
150
223
|
width: 100%;
|
|
151
|
-
height: $
|
|
224
|
+
height: $custom-select-height;
|
|
152
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;
|
|
153
229
|
line-height: $custom-select-line-height;
|
|
154
230
|
color: $custom-select-color;
|
|
155
231
|
vertical-align: middle;
|
|
156
|
-
background: $custom-select-bg $custom-select-
|
|
157
|
-
background-size: $custom-select-bg-size;
|
|
232
|
+
background: $custom-select-bg $custom-select-background;
|
|
158
233
|
border: $custom-select-border-width solid $custom-select-border-color;
|
|
159
|
-
@
|
|
160
|
-
|
|
161
|
-
} @else {
|
|
162
|
-
border-radius: 0;
|
|
163
|
-
}
|
|
234
|
+
@include border-radius($custom-select-border-radius, 0);
|
|
235
|
+
@include box-shadow($custom-select-box-shadow);
|
|
164
236
|
appearance: none;
|
|
165
237
|
|
|
166
238
|
&:focus {
|
|
167
239
|
border-color: $custom-select-focus-border-color;
|
|
168
240
|
outline: 0;
|
|
169
|
-
|
|
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
|
+
}
|
|
170
247
|
|
|
171
248
|
&::-ms-value {
|
|
172
249
|
// For visual consistency with other platforms/browsers,
|
|
@@ -193,22 +270,30 @@
|
|
|
193
270
|
|
|
194
271
|
// Hides the default caret in IE11
|
|
195
272
|
&::-ms-expand {
|
|
196
|
-
|
|
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;
|
|
197
280
|
}
|
|
198
281
|
}
|
|
199
282
|
|
|
200
283
|
.custom-select-sm {
|
|
201
284
|
height: $custom-select-height-sm;
|
|
202
|
-
padding-top: $custom-select-padding-y;
|
|
203
|
-
padding-bottom: $custom-select-padding-y;
|
|
204
|
-
|
|
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);
|
|
205
289
|
}
|
|
206
290
|
|
|
207
291
|
.custom-select-lg {
|
|
208
292
|
height: $custom-select-height-lg;
|
|
209
|
-
padding-top: $custom-select-padding-y;
|
|
210
|
-
padding-bottom: $custom-select-padding-y;
|
|
211
|
-
|
|
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);
|
|
212
297
|
}
|
|
213
298
|
|
|
214
299
|
|
|
@@ -230,15 +315,18 @@
|
|
|
230
315
|
width: 100%;
|
|
231
316
|
height: $custom-file-height;
|
|
232
317
|
margin: 0;
|
|
318
|
+
overflow: hidden;
|
|
233
319
|
opacity: 0;
|
|
234
320
|
|
|
235
|
-
&:focus ~ .custom-file-
|
|
321
|
+
&:focus ~ .custom-file-label {
|
|
236
322
|
border-color: $custom-file-focus-border-color;
|
|
237
323
|
box-shadow: $custom-file-focus-box-shadow;
|
|
324
|
+
}
|
|
238
325
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
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;
|
|
242
330
|
}
|
|
243
331
|
|
|
244
332
|
@each $lang, $value in $custom-file-text {
|
|
@@ -246,6 +334,10 @@
|
|
|
246
334
|
content: $value;
|
|
247
335
|
}
|
|
248
336
|
}
|
|
337
|
+
|
|
338
|
+
~ .custom-file-label[data-browse]::after {
|
|
339
|
+
content: attr(data-browse);
|
|
340
|
+
}
|
|
249
341
|
}
|
|
250
342
|
|
|
251
343
|
.custom-file-label {
|
|
@@ -256,6 +348,9 @@
|
|
|
256
348
|
z-index: 1;
|
|
257
349
|
height: $custom-file-height;
|
|
258
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;
|
|
259
354
|
line-height: $custom-file-line-height;
|
|
260
355
|
color: $custom-file-color;
|
|
261
356
|
background-color: $custom-file-bg;
|
|
@@ -270,13 +365,162 @@
|
|
|
270
365
|
bottom: 0;
|
|
271
366
|
z-index: 3;
|
|
272
367
|
display: block;
|
|
273
|
-
height:
|
|
368
|
+
height: $custom-file-height-inner;
|
|
274
369
|
padding: $custom-file-padding-y $custom-file-padding-x;
|
|
275
370
|
line-height: $custom-file-line-height;
|
|
276
371
|
color: $custom-file-button-color;
|
|
277
372
|
content: "Browse";
|
|
278
373
|
@include gradient-bg($custom-file-button-bg);
|
|
279
|
-
border-left:
|
|
374
|
+
border-left: inherit;
|
|
280
375
|
@include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0);
|
|
281
376
|
}
|
|
282
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
|
+
}
|