bootstrap-scss 5.1.3 → 5.2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +2 -2
- package/README.md +5 -5
- package/_accordion.scss +149 -118
- package/_alert.scss +18 -4
- package/_badge.scss +14 -5
- package/_breadcrumb.scss +22 -10
- package/_button-group.scss +142 -139
- package/_buttons.scss +201 -111
- package/_card.scss +55 -37
- package/_close.scss +1 -1
- package/_containers.scss +1 -1
- package/_dropdown.scss +249 -240
- package/_functions.scss +302 -302
- package/_grid.scss +3 -3
- package/_helpers.scss +1 -0
- package/_list-group.scss +192 -174
- package/_maps.scss +54 -0
- package/_modal.scss +237 -209
- package/_nav.scss +172 -139
- package/_navbar.scss +278 -335
- package/_offcanvas.scss +144 -83
- package/_pagination.scss +109 -64
- package/_placeholders.scss +1 -1
- package/_popover.scss +196 -158
- package/_progress.scss +20 -9
- package/_reboot.scss +25 -40
- package/_root.scss +40 -21
- package/_spinners.scss +38 -22
- package/_tables.scss +32 -23
- package/_toasts.scss +71 -51
- package/_tooltip.scss +61 -56
- package/_type.scss +2 -0
- package/_utilities.scss +43 -26
- package/_variables.scss +1634 -1641
- package/bootstrap-grid.scss +3 -6
- package/bootstrap-reboot.scss +3 -7
- package/bootstrap-utilities.scss +3 -6
- package/bootstrap.scss +4 -6
- package/forms/_floating-labels.scss +75 -63
- package/forms/_form-check.scss +28 -5
- package/forms/_form-control.scss +12 -37
- package/forms/_form-select.scss +0 -1
- package/forms/_input-group.scss +132 -121
- package/helpers/_color-bg.scss +10 -0
- package/helpers/_colored-links.scss +2 -2
- package/helpers/_position.scss +7 -1
- package/helpers/_ratio.scss +2 -2
- package/helpers/_vr.scss +1 -1
- package/mixins/_alert.scss +7 -3
- package/mixins/_banner.scss +9 -0
- package/mixins/_breakpoints.scss +8 -8
- package/mixins/_buttons.scss +32 -95
- package/mixins/_container.scss +4 -2
- package/mixins/_forms.scss +152 -144
- package/mixins/_gradients.scss +1 -1
- package/mixins/_grid.scss +12 -12
- package/mixins/_pagination.scss +4 -25
- package/mixins/_reset-text.scss +1 -1
- package/mixins/_table-variants.scss +12 -9
- package/mixins/_utilities.scss +97 -89
- package/package.json +1 -1
package/bootstrap-grid.scss
CHANGED
@@ -1,14 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
* Copyright 2011-2021 The Bootstrap Authors
|
4
|
-
* Copyright 2011-2021 Twitter, Inc.
|
5
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
6
|
-
*/
|
1
|
+
@import "mixins/banner";
|
2
|
+
@include bsBanner(Grid);
|
7
3
|
|
8
4
|
$include-column-box-sizing: true !default;
|
9
5
|
|
10
6
|
@import "functions";
|
11
7
|
@import "variables";
|
8
|
+
@import "maps";
|
12
9
|
|
13
10
|
@import "mixins/lists";
|
14
11
|
@import "mixins/breakpoints";
|
package/bootstrap-reboot.scss
CHANGED
@@ -1,13 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
* Copyright 2011-2021 The Bootstrap Authors
|
4
|
-
* Copyright 2011-2021 Twitter, Inc.
|
5
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
6
|
-
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
7
|
-
*/
|
1
|
+
@import "mixins/banner";
|
2
|
+
@include bsBanner(Reboot);
|
8
3
|
|
9
4
|
@import "functions";
|
10
5
|
@import "variables";
|
6
|
+
@import "maps";
|
11
7
|
@import "mixins";
|
12
8
|
@import "root";
|
13
9
|
@import "reboot";
|
package/bootstrap-utilities.scss
CHANGED
@@ -1,13 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
* Copyright 2011-2021 The Bootstrap Authors
|
4
|
-
* Copyright 2011-2021 Twitter, Inc.
|
5
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
6
|
-
*/
|
1
|
+
@import "mixins/banner";
|
2
|
+
@include bsBanner(Utilities);
|
7
3
|
|
8
4
|
// Configuration
|
9
5
|
@import "functions";
|
10
6
|
@import "variables";
|
7
|
+
@import "maps";
|
11
8
|
@import "mixins";
|
12
9
|
@import "utilities";
|
13
10
|
|
package/bootstrap.scss
CHANGED
@@ -1,14 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
* Copyright 2011-2021 Twitter, Inc.
|
5
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
6
|
-
*/
|
1
|
+
@import "mixins/banner";
|
2
|
+
@include bsBanner("");
|
3
|
+
|
7
4
|
|
8
5
|
// scss-docs-start import-stack
|
9
6
|
// Configuration
|
10
7
|
@import "functions";
|
11
8
|
@import "variables";
|
9
|
+
@import "maps";
|
12
10
|
@import "mixins";
|
13
11
|
@import "utilities";
|
14
12
|
|
@@ -1,63 +1,75 @@
|
|
1
|
-
.form-floating {
|
2
|
-
position: relative;
|
3
|
-
|
4
|
-
> .form-control,
|
5
|
-
> .form-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
}
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
padding-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
> .form-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
> .form-
|
57
|
-
~ label {
|
58
|
-
opacity: $form-floating-label-opacity;
|
59
|
-
transform: $form-floating-label-transform;
|
60
|
-
}
|
61
|
-
}
|
62
|
-
//
|
63
|
-
|
1
|
+
.form-floating {
|
2
|
+
position: relative;
|
3
|
+
|
4
|
+
> .form-control,
|
5
|
+
> .form-control-plaintext,
|
6
|
+
> .form-select {
|
7
|
+
height: $form-floating-height;
|
8
|
+
line-height: $form-floating-line-height;
|
9
|
+
}
|
10
|
+
|
11
|
+
> label {
|
12
|
+
position: absolute;
|
13
|
+
top: 0;
|
14
|
+
left: 0;
|
15
|
+
width: 100%;
|
16
|
+
height: 100%; // allow textareas
|
17
|
+
padding: $form-floating-padding-y $form-floating-padding-x;
|
18
|
+
overflow: hidden;
|
19
|
+
text-align: start;
|
20
|
+
text-overflow: ellipsis;
|
21
|
+
white-space: nowrap;
|
22
|
+
pointer-events: none;
|
23
|
+
border: $input-border-width solid transparent; // Required for aligning label's text with the input as it affects inner box model
|
24
|
+
transform-origin: 0 0;
|
25
|
+
@include transition($form-floating-transition);
|
26
|
+
}
|
27
|
+
|
28
|
+
> .form-control,
|
29
|
+
> .form-control-plaintext {
|
30
|
+
padding: $form-floating-padding-y $form-floating-padding-x;
|
31
|
+
|
32
|
+
&::placeholder {
|
33
|
+
color: transparent;
|
34
|
+
}
|
35
|
+
|
36
|
+
&:focus,
|
37
|
+
&:not(:placeholder-shown) {
|
38
|
+
padding-top: $form-floating-input-padding-t;
|
39
|
+
padding-bottom: $form-floating-input-padding-b;
|
40
|
+
}
|
41
|
+
// Duplicated because `:-webkit-autofill` invalidates other selectors when grouped
|
42
|
+
&:-webkit-autofill {
|
43
|
+
padding-top: $form-floating-input-padding-t;
|
44
|
+
padding-bottom: $form-floating-input-padding-b;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
> .form-select {
|
49
|
+
padding-top: $form-floating-input-padding-t;
|
50
|
+
padding-bottom: $form-floating-input-padding-b;
|
51
|
+
}
|
52
|
+
|
53
|
+
> .form-control:focus,
|
54
|
+
> .form-control:not(:placeholder-shown),
|
55
|
+
> .form-control-plaintext,
|
56
|
+
> .form-select {
|
57
|
+
~ label {
|
58
|
+
opacity: $form-floating-label-opacity;
|
59
|
+
transform: $form-floating-label-transform;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
// Duplicated because `:-webkit-autofill` invalidates other selectors when grouped
|
63
|
+
> .form-control:-webkit-autofill {
|
64
|
+
~ label {
|
65
|
+
opacity: $form-floating-label-opacity;
|
66
|
+
transform: $form-floating-label-transform;
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
> .form-control-plaintext {
|
71
|
+
~ label {
|
72
|
+
border-width: $input-border-width 0; // Required to properly position label text - as explained above
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
package/forms/_form-check.scss
CHANGED
@@ -14,6 +14,18 @@
|
|
14
14
|
}
|
15
15
|
}
|
16
16
|
|
17
|
+
.form-check-reverse {
|
18
|
+
padding-right: $form-check-padding-start;
|
19
|
+
padding-left: 0;
|
20
|
+
text-align: right;
|
21
|
+
|
22
|
+
.form-check-input {
|
23
|
+
float: right;
|
24
|
+
margin-right: $form-check-padding-start * -1;
|
25
|
+
margin-left: 0;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
17
29
|
.form-check-input {
|
18
30
|
width: $form-check-input-width;
|
19
31
|
height: $form-check-input-width;
|
@@ -25,7 +37,7 @@
|
|
25
37
|
background-size: contain;
|
26
38
|
border: $form-check-input-border;
|
27
39
|
appearance: none;
|
28
|
-
color-adjust: exact; // Keep themed appearance for print
|
40
|
+
print-color-adjust: exact; // Keep themed appearance for print
|
29
41
|
@include transition($form-check-transition);
|
30
42
|
|
31
43
|
&[type="checkbox"] {
|
@@ -53,7 +65,7 @@
|
|
53
65
|
|
54
66
|
&[type="checkbox"] {
|
55
67
|
@if $enable-gradients {
|
56
|
-
background-image: escape-svg($form-check-input-checked-bg-image), var(--#{$
|
68
|
+
background-image: escape-svg($form-check-input-checked-bg-image), var(--#{$prefix}gradient);
|
57
69
|
} @else {
|
58
70
|
background-image: escape-svg($form-check-input-checked-bg-image);
|
59
71
|
}
|
@@ -61,7 +73,7 @@
|
|
61
73
|
|
62
74
|
&[type="radio"] {
|
63
75
|
@if $enable-gradients {
|
64
|
-
background-image: escape-svg($form-check-radio-checked-bg-image), var(--#{$
|
76
|
+
background-image: escape-svg($form-check-radio-checked-bg-image), var(--#{$prefix}gradient);
|
65
77
|
} @else {
|
66
78
|
background-image: escape-svg($form-check-radio-checked-bg-image);
|
67
79
|
}
|
@@ -73,7 +85,7 @@
|
|
73
85
|
border-color: $form-check-input-indeterminate-border-color;
|
74
86
|
|
75
87
|
@if $enable-gradients {
|
76
|
-
background-image: escape-svg($form-check-input-indeterminate-bg-image), var(--#{$
|
88
|
+
background-image: escape-svg($form-check-input-indeterminate-bg-image), var(--#{$prefix}gradient);
|
77
89
|
} @else {
|
78
90
|
background-image: escape-svg($form-check-input-indeterminate-bg-image);
|
79
91
|
}
|
@@ -90,6 +102,7 @@
|
|
90
102
|
&[disabled],
|
91
103
|
&:disabled {
|
92
104
|
~ .form-check-label {
|
105
|
+
cursor: default;
|
93
106
|
opacity: $form-check-label-disabled-opacity;
|
94
107
|
}
|
95
108
|
}
|
@@ -123,12 +136,22 @@
|
|
123
136
|
background-position: $form-switch-checked-bg-position;
|
124
137
|
|
125
138
|
@if $enable-gradients {
|
126
|
-
background-image: escape-svg($form-switch-checked-bg-image), var(--#{$
|
139
|
+
background-image: escape-svg($form-switch-checked-bg-image), var(--#{$prefix}gradient);
|
127
140
|
} @else {
|
128
141
|
background-image: escape-svg($form-switch-checked-bg-image);
|
129
142
|
}
|
130
143
|
}
|
131
144
|
}
|
145
|
+
|
146
|
+
&.form-check-reverse {
|
147
|
+
padding-right: $form-switch-padding-start;
|
148
|
+
padding-left: 0;
|
149
|
+
|
150
|
+
.form-check-input {
|
151
|
+
margin-right: $form-switch-padding-start * -1;
|
152
|
+
margin-left: 0;
|
153
|
+
}
|
154
|
+
}
|
132
155
|
}
|
133
156
|
|
134
157
|
.form-check-inline {
|
package/forms/_form-control.scss
CHANGED
@@ -59,13 +59,13 @@
|
|
59
59
|
opacity: 1;
|
60
60
|
}
|
61
61
|
|
62
|
-
// Disabled
|
62
|
+
// Disabled inputs
|
63
63
|
//
|
64
64
|
// HTML5 says that controls under a fieldset > legend:first-child won't be
|
65
65
|
// disabled if the fieldset is disabled. Due to implementation difficulty, we
|
66
66
|
// don't honor that edge case; we style them as disabled anyway.
|
67
|
-
&:disabled
|
68
|
-
|
67
|
+
&:disabled {
|
68
|
+
color: $input-disabled-color;
|
69
69
|
background-color: $input-disabled-bg;
|
70
70
|
border-color: $input-disabled-border-color;
|
71
71
|
// iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
|
@@ -91,25 +91,6 @@
|
|
91
91
|
&:hover:not(:disabled):not([readonly])::file-selector-button {
|
92
92
|
background-color: $form-file-button-hover-bg;
|
93
93
|
}
|
94
|
-
|
95
|
-
&::-webkit-file-upload-button {
|
96
|
-
padding: $input-padding-y $input-padding-x;
|
97
|
-
margin: (-$input-padding-y) (-$input-padding-x);
|
98
|
-
margin-inline-end: $input-padding-x;
|
99
|
-
color: $form-file-button-color;
|
100
|
-
@include gradient-bg($form-file-button-bg);
|
101
|
-
pointer-events: none;
|
102
|
-
border-color: inherit;
|
103
|
-
border-style: solid;
|
104
|
-
border-width: 0;
|
105
|
-
border-inline-end-width: $input-border-width;
|
106
|
-
border-radius: 0; // stylelint-disable-line property-disallowed-list
|
107
|
-
@include transition($btn-transition);
|
108
|
-
}
|
109
|
-
|
110
|
-
&:hover:not(:disabled):not([readonly])::-webkit-file-upload-button {
|
111
|
-
background-color: $form-file-button-hover-bg;
|
112
|
-
}
|
113
94
|
}
|
114
95
|
|
115
96
|
// Readonly controls as plain text
|
@@ -128,6 +109,10 @@
|
|
128
109
|
border: solid transparent;
|
129
110
|
border-width: $input-border-width 0;
|
130
111
|
|
112
|
+
&:focus {
|
113
|
+
outline: 0;
|
114
|
+
}
|
115
|
+
|
131
116
|
&.form-control-sm,
|
132
117
|
&.form-control-lg {
|
133
118
|
padding-right: 0;
|
@@ -153,12 +138,6 @@
|
|
153
138
|
margin: (-$input-padding-y-sm) (-$input-padding-x-sm);
|
154
139
|
margin-inline-end: $input-padding-x-sm;
|
155
140
|
}
|
156
|
-
|
157
|
-
&::-webkit-file-upload-button {
|
158
|
-
padding: $input-padding-y-sm $input-padding-x-sm;
|
159
|
-
margin: (-$input-padding-y-sm) (-$input-padding-x-sm);
|
160
|
-
margin-inline-end: $input-padding-x-sm;
|
161
|
-
}
|
162
141
|
}
|
163
142
|
|
164
143
|
.form-control-lg {
|
@@ -172,12 +151,6 @@
|
|
172
151
|
margin: (-$input-padding-y-lg) (-$input-padding-x-lg);
|
173
152
|
margin-inline-end: $input-padding-x-lg;
|
174
153
|
}
|
175
|
-
|
176
|
-
&::-webkit-file-upload-button {
|
177
|
-
padding: $input-padding-y-lg $input-padding-x-lg;
|
178
|
-
margin: (-$input-padding-y-lg) (-$input-padding-x-lg);
|
179
|
-
margin-inline-end: $input-padding-x-lg;
|
180
|
-
}
|
181
154
|
}
|
182
155
|
|
183
156
|
// Make sure textareas don't shrink too much when resized
|
@@ -200,7 +173,7 @@ textarea {
|
|
200
173
|
|
201
174
|
.form-control-color {
|
202
175
|
width: $form-color-width;
|
203
|
-
height:
|
176
|
+
height: $input-height;
|
204
177
|
padding: $input-padding-y;
|
205
178
|
|
206
179
|
&:not(:disabled):not([readonly]) {
|
@@ -208,12 +181,14 @@ textarea {
|
|
208
181
|
}
|
209
182
|
|
210
183
|
&::-moz-color-swatch {
|
211
|
-
|
184
|
+
border: 0 !important; // stylelint-disable-line declaration-no-important
|
212
185
|
@include border-radius($input-border-radius);
|
213
186
|
}
|
214
187
|
|
215
188
|
&::-webkit-color-swatch {
|
216
|
-
height: if(unit($input-line-height) == "", $input-line-height * 1em, $input-line-height);
|
217
189
|
@include border-radius($input-border-radius);
|
218
190
|
}
|
191
|
+
|
192
|
+
&.form-control-sm { height: $input-height-sm; }
|
193
|
+
&.form-control-lg { height: $input-height-lg; }
|
219
194
|
}
|
package/forms/_form-select.scss
CHANGED
@@ -7,7 +7,6 @@
|
|
7
7
|
display: block;
|
8
8
|
width: 100%;
|
9
9
|
padding: $form-select-padding-y $form-select-indicator-padding $form-select-padding-y $form-select-padding-x;
|
10
|
-
// stylelint-disable-next-line property-no-vendor-prefix
|
11
10
|
-moz-padding-start: subtract($form-select-padding-x, 3px); // See https://github.com/twbs/bootstrap/issues/32636
|
12
11
|
font-family: $form-select-font-family;
|
13
12
|
@include font-size($form-select-font-size);
|
package/forms/_input-group.scss
CHANGED
@@ -1,121 +1,132 @@
|
|
1
|
-
//
|
2
|
-
// Base styles
|
3
|
-
//
|
4
|
-
|
5
|
-
.input-group {
|
6
|
-
position: relative;
|
7
|
-
display: flex;
|
8
|
-
flex-wrap: wrap; // For form validation feedback
|
9
|
-
align-items: stretch;
|
10
|
-
width: 100%;
|
11
|
-
|
12
|
-
> .form-control,
|
13
|
-
> .form-select
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
> .form-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
//
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
}
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
//
|
43
|
-
//
|
44
|
-
|
45
|
-
.
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
//
|
64
|
-
//
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
.input-group-lg > .
|
69
|
-
.input-group-lg > .
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
.input-group-sm > .
|
78
|
-
.input-group-sm > .
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
//
|
93
|
-
//
|
94
|
-
//
|
95
|
-
|
96
|
-
//
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
}
|
1
|
+
//
|
2
|
+
// Base styles
|
3
|
+
//
|
4
|
+
|
5
|
+
.input-group {
|
6
|
+
position: relative;
|
7
|
+
display: flex;
|
8
|
+
flex-wrap: wrap; // For form validation feedback
|
9
|
+
align-items: stretch;
|
10
|
+
width: 100%;
|
11
|
+
|
12
|
+
> .form-control,
|
13
|
+
> .form-select,
|
14
|
+
> .form-floating {
|
15
|
+
position: relative; // For focus state's z-index
|
16
|
+
flex: 1 1 auto;
|
17
|
+
width: 1%;
|
18
|
+
min-width: 0; // https://stackoverflow.com/questions/36247140/why-dont-flex-items-shrink-past-content-size
|
19
|
+
}
|
20
|
+
|
21
|
+
// Bring the "active" form control to the top of surrounding elements
|
22
|
+
> .form-control:focus,
|
23
|
+
> .form-select:focus,
|
24
|
+
> .form-floating:focus-within {
|
25
|
+
z-index: 5;
|
26
|
+
}
|
27
|
+
|
28
|
+
// Ensure buttons are always above inputs for more visually pleasing borders.
|
29
|
+
// This isn't needed for `.input-group-text` since it shares the same border-color
|
30
|
+
// as our inputs.
|
31
|
+
.btn {
|
32
|
+
position: relative;
|
33
|
+
z-index: 2;
|
34
|
+
|
35
|
+
&:focus {
|
36
|
+
z-index: 5;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
|
42
|
+
// Textual addons
|
43
|
+
//
|
44
|
+
// Serves as a catch-all element for any text or radio/checkbox input you wish
|
45
|
+
// to prepend or append to an input.
|
46
|
+
|
47
|
+
.input-group-text {
|
48
|
+
display: flex;
|
49
|
+
align-items: center;
|
50
|
+
padding: $input-group-addon-padding-y $input-group-addon-padding-x;
|
51
|
+
@include font-size($input-font-size); // Match inputs
|
52
|
+
font-weight: $input-group-addon-font-weight;
|
53
|
+
line-height: $input-line-height;
|
54
|
+
color: $input-group-addon-color;
|
55
|
+
text-align: center;
|
56
|
+
white-space: nowrap;
|
57
|
+
background-color: $input-group-addon-bg;
|
58
|
+
border: $input-border-width solid $input-group-addon-border-color;
|
59
|
+
@include border-radius($input-border-radius);
|
60
|
+
}
|
61
|
+
|
62
|
+
|
63
|
+
// Sizing
|
64
|
+
//
|
65
|
+
// Remix the default form control sizing classes into new ones for easier
|
66
|
+
// manipulation.
|
67
|
+
|
68
|
+
.input-group-lg > .form-control,
|
69
|
+
.input-group-lg > .form-select,
|
70
|
+
.input-group-lg > .input-group-text,
|
71
|
+
.input-group-lg > .btn {
|
72
|
+
padding: $input-padding-y-lg $input-padding-x-lg;
|
73
|
+
@include font-size($input-font-size-lg);
|
74
|
+
@include border-radius($input-border-radius-lg);
|
75
|
+
}
|
76
|
+
|
77
|
+
.input-group-sm > .form-control,
|
78
|
+
.input-group-sm > .form-select,
|
79
|
+
.input-group-sm > .input-group-text,
|
80
|
+
.input-group-sm > .btn {
|
81
|
+
padding: $input-padding-y-sm $input-padding-x-sm;
|
82
|
+
@include font-size($input-font-size-sm);
|
83
|
+
@include border-radius($input-border-radius-sm);
|
84
|
+
}
|
85
|
+
|
86
|
+
.input-group-lg > .form-select,
|
87
|
+
.input-group-sm > .form-select {
|
88
|
+
padding-right: $form-select-padding-x + $form-select-indicator-padding;
|
89
|
+
}
|
90
|
+
|
91
|
+
|
92
|
+
// Rounded corners
|
93
|
+
//
|
94
|
+
// These rulesets must come after the sizing ones to properly override sm and lg
|
95
|
+
// border-radius values when extending. They're more specific than we'd like
|
96
|
+
// with the `.input-group >` part, but without it, we cannot override the sizing.
|
97
|
+
|
98
|
+
// stylelint-disable-next-line no-duplicate-selectors
|
99
|
+
.input-group {
|
100
|
+
&:not(.has-validation) {
|
101
|
+
> :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating),
|
102
|
+
> .dropdown-toggle:nth-last-child(n + 3),
|
103
|
+
> .form-floating:not(:last-child) > .form-control,
|
104
|
+
> .form-floating:not(:last-child) > .form-select {
|
105
|
+
@include border-end-radius(0);
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
109
|
+
&.has-validation {
|
110
|
+
> :nth-last-child(n + 3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating),
|
111
|
+
> .dropdown-toggle:nth-last-child(n + 4),
|
112
|
+
> .form-floating:nth-last-child(n + 3) > .form-control,
|
113
|
+
> .form-floating:nth-last-child(n + 3) > .form-select {
|
114
|
+
@include border-end-radius(0);
|
115
|
+
}
|
116
|
+
}
|
117
|
+
|
118
|
+
$validation-messages: "";
|
119
|
+
@each $state in map-keys($form-validation-states) {
|
120
|
+
$validation-messages: $validation-messages + ":not(." + unquote($state) + "-tooltip)" + ":not(." + unquote($state) + "-feedback)";
|
121
|
+
}
|
122
|
+
|
123
|
+
> :not(:first-child):not(.dropdown-menu)#{$validation-messages} {
|
124
|
+
margin-left: -$input-border-width;
|
125
|
+
@include border-start-radius(0);
|
126
|
+
}
|
127
|
+
|
128
|
+
> .form-floating:not(:first-child) > .form-control,
|
129
|
+
> .form-floating:not(:first-child) > .form-select {
|
130
|
+
@include border-start-radius(0);
|
131
|
+
}
|
132
|
+
}
|