@gettrx/core-styles 1.0.28 → 1.0.29
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.
- package/dist/assets/core-icons.json +7512 -0
- package/dist/assets/fonts/Gettrx-Icon.ttf +0 -0
- package/dist/assets/fonts/Gettrx-Icon.woff +0 -0
- package/dist/assets/fonts/Gettrx-Icon.woff2 +0 -0
- package/dist/assets/fonts/Roboto-Black.ttf +0 -0
- package/dist/assets/fonts/Roboto-BlackItalic.ttf +0 -0
- package/dist/assets/fonts/Roboto-Bold.ttf +0 -0
- package/dist/assets/fonts/Roboto-BoldItalic.ttf +0 -0
- package/dist/assets/fonts/Roboto-Italic.ttf +0 -0
- package/dist/assets/fonts/Roboto-Light.ttf +0 -0
- package/dist/assets/fonts/Roboto-LightItalic.ttf +0 -0
- package/dist/assets/fonts/Roboto-Medium.ttf +0 -0
- package/dist/assets/fonts/Roboto-MediumItalic.ttf +0 -0
- package/dist/assets/fonts/Roboto-Regular.ttf +0 -0
- package/dist/assets/fonts/Roboto-Thin.ttf +0 -0
- package/dist/assets/fonts/Roboto-ThinItalic.ttf +0 -0
- package/dist/assets/fonts/tabler-icons.eot +0 -0
- package/dist/assets/fonts/tabler-icons.ttf +0 -0
- package/dist/assets/fonts/tabler-icons.woff +0 -0
- package/dist/assets/fonts/tabler-icons.woff2 +0 -0
- package/dist/core-styles.css +1 -0
- package/dist/core-styles.scss +12 -0
- package/dist/styles/_font-face.scss +77 -0
- package/dist/styles/_functions.scss +180 -0
- package/dist/styles/_icons.scss +1535 -0
- package/dist/styles/_reboot.scss +610 -0
- package/dist/styles/_variables.scss +1125 -0
- package/dist/styles/components/_accordion.scss +149 -0
- package/dist/styles/components/_alert.scss +68 -0
- package/dist/styles/components/_badge.scss +38 -0
- package/dist/styles/components/_breadcrumb.scss +40 -0
- package/dist/styles/components/_button-group.scss +142 -0
- package/dist/styles/components/_buttons.scss +192 -0
- package/dist/styles/components/_card.scss +239 -0
- package/dist/styles/components/_carousel.scss +209 -0
- package/dist/styles/components/_close.scss +56 -0
- package/dist/styles/components/_dropdown.scss +232 -0
- package/dist/styles/components/_forms.scss +9 -0
- package/dist/styles/components/_images.scss +42 -0
- package/dist/styles/components/_list-group.scss +197 -0
- package/dist/styles/components/_modal.scss +237 -0
- package/dist/styles/components/_nav.scss +209 -0
- package/dist/styles/components/_navbar.scss +268 -0
- package/dist/styles/components/_pagination.scss +109 -0
- package/dist/styles/components/_placeholders.scss +51 -0
- package/dist/styles/components/_popover.scss +196 -0
- package/dist/styles/components/_progress.scss +62 -0
- package/dist/styles/components/_spinners.scss +83 -0
- package/dist/styles/components/_tables.scss +171 -0
- package/dist/styles/components/_toasts.scss +73 -0
- package/dist/styles/components/_tooltip.scss +119 -0
- package/dist/styles/components/_type.scss +95 -0
- package/dist/styles/components/forms/_floating-labels.scss +94 -0
- package/dist/styles/components/forms/_form-check.scss +164 -0
- package/dist/styles/components/forms/_form-control.scss +216 -0
- package/dist/styles/components/forms/_form-range.scss +91 -0
- package/dist/styles/components/forms/_form-select.scss +69 -0
- package/dist/styles/components/forms/_form-text.scss +11 -0
- package/dist/styles/components/forms/_input-group.scss +132 -0
- package/dist/styles/components/forms/_labels.scss +36 -0
- package/dist/styles/components/forms/_validation.scss +12 -0
- package/dist/styles/components/mixins/_alert.scss +14 -0
- package/dist/styles/components/mixins/_backdrop.scss +14 -0
- package/dist/styles/components/mixins/_banner.scss +7 -0
- package/dist/styles/components/mixins/_box-shadow.scss +16 -0
- package/dist/styles/components/mixins/_buttons.scss +70 -0
- package/dist/styles/components/mixins/_caret.scss +68 -0
- package/dist/styles/components/mixins/_clearfix.scss +9 -0
- package/dist/styles/components/mixins/_deprecate.scss +10 -0
- package/dist/styles/components/mixins/_forms.scss +145 -0
- package/dist/styles/components/mixins/_gradients.scss +43 -0
- package/dist/styles/components/mixins/_image.scss +16 -0
- package/dist/styles/components/mixins/_list-group.scss +26 -0
- package/dist/styles/components/mixins/_lists.scss +7 -0
- package/dist/styles/components/mixins/_pagination.scss +10 -0
- package/dist/styles/components/mixins/_reset-text.scss +17 -0
- package/dist/styles/components/mixins/_resize.scss +6 -0
- package/dist/styles/components/mixins/_table-variants.scss +24 -0
- package/dist/styles/components/mixins/_text-truncate.scss +8 -0
- package/dist/styles/components/mixins/_transition.scss +24 -0
- package/dist/styles/components/mixins/_visually-hidden.scss +33 -0
- package/dist/styles/css/gettrx.css +13552 -0
- package/dist/styles/functions/_color.functions.scss +14 -0
- package/dist/styles/functions/_grid.functions.scss +41 -0
- package/dist/styles/functions/_map.functions.scss +36 -0
- package/dist/styles/layout/_containers.scss +43 -0
- package/dist/styles/layout/_grid.scss +26 -0
- package/dist/styles/layout/_layout.scss +2 -0
- package/dist/styles/maps/_border.maps.scss +24 -0
- package/dist/styles/maps/_colors.maps.scss +10 -0
- package/dist/styles/maps/_fonts.maps.scss +10 -0
- package/dist/styles/maps/_layout.maps.scss +33 -0
- package/dist/styles/maps/_positions.maps.scss +15 -0
- package/dist/styles/maps/_shadow.maps.scss +11 -0
- package/dist/styles/maps/_spacing.maps.scss +23 -0
- package/dist/styles/mixins/_border-radius.mixins.scss +61 -0
- package/dist/styles/mixins/_breakpoints.mixins.scss +129 -0
- package/dist/styles/mixins/_container.mixins.scss +13 -0
- package/dist/styles/mixins/_grid.mixins.scss +157 -0
- package/dist/styles/mixins/_utilities.mixins.scss +84 -0
- package/dist/styles/utilities/_api.scss +33 -0
- package/dist/styles/utilities/_utilities.scss +695 -0
- package/dist/tokens/_tokens.scss +216 -0
- package/dist/tokens/tokens.css +218 -0
- package/dist/tokens/tokens.js +216 -0
- package/package.json +1 -1
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
//
|
|
2
|
+
// General form controls (plus a few specific high-level interventions)
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
.form-control {
|
|
6
|
+
display: block;
|
|
7
|
+
width: 100%;
|
|
8
|
+
padding: $input-padding-y $input-padding-x;
|
|
9
|
+
font-family: $input-font-family;
|
|
10
|
+
font-size: $input-font-size;
|
|
11
|
+
font-weight: $input-font-weight;
|
|
12
|
+
line-height: $input-line-height;
|
|
13
|
+
color: $input-color;
|
|
14
|
+
background-color: $input-bg;
|
|
15
|
+
background-clip: padding-box;
|
|
16
|
+
border: $input-border-width solid $input-border-color;
|
|
17
|
+
appearance: none; // Fix appearance for date inputs in Safari
|
|
18
|
+
|
|
19
|
+
// Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
|
|
20
|
+
@include border-radius($input-border-radius, 0);
|
|
21
|
+
|
|
22
|
+
@include box-shadow($input-box-shadow);
|
|
23
|
+
@include transition($input-transition);
|
|
24
|
+
|
|
25
|
+
&[type="file"] {
|
|
26
|
+
overflow: hidden; // prevent pseudo element button overlap
|
|
27
|
+
|
|
28
|
+
&:not(:disabled):not([readonly]) {
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Customize the `:focus` state to imitate native WebKit styles.
|
|
34
|
+
&:focus {
|
|
35
|
+
color: $input-focus-color;
|
|
36
|
+
background-color: $input-focus-bg;
|
|
37
|
+
border-color: $input-focus-border-color;
|
|
38
|
+
outline: 0;
|
|
39
|
+
// Avoid using mixin so we can pass custom focus shadow properly
|
|
40
|
+
box-shadow: $input-focus-box-shadow;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&::-webkit-date-and-time-value {
|
|
44
|
+
// On Android Chrome, form-control's "width: 100%" makes the input width too small
|
|
45
|
+
// Tested under Android 11 / Chrome 89, Android 12 / Chrome 100, Android 13 / Chrome 109
|
|
46
|
+
//
|
|
47
|
+
// On iOS Safari, form-control's "appearance: none" + "width: 100%" makes the input width too small
|
|
48
|
+
// Tested under iOS 16.2 / Safari 16.2
|
|
49
|
+
min-width: 85px; // Seems to be a good minimum safe width
|
|
50
|
+
|
|
51
|
+
// Add some height to date inputs on iOS
|
|
52
|
+
// https://github.com/twbs/bootstrap/issues/23307
|
|
53
|
+
// TODO: we can remove this workaround once https://bugs.webkit.org/show_bug.cgi?id=198959 is resolved
|
|
54
|
+
// Multiply line-height by 1em if it has no unit
|
|
55
|
+
height: if(unit($input-line-height) == "", $input-line-height * 1em, $input-line-height);
|
|
56
|
+
|
|
57
|
+
// Android Chrome type="date" is taller than the other inputs
|
|
58
|
+
// because of "margin: 1px 24px 1px 4px" inside the shadow DOM
|
|
59
|
+
// Tested under Android 11 / Chrome 89, Android 12 / Chrome 100, Android 13 / Chrome 109
|
|
60
|
+
margin: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Prevent excessive date input height in Webkit
|
|
64
|
+
// https://github.com/twbs/bootstrap/issues/34433
|
|
65
|
+
&::-webkit-datetime-edit {
|
|
66
|
+
display: block;
|
|
67
|
+
padding: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Placeholder
|
|
71
|
+
&::placeholder {
|
|
72
|
+
color: $input-placeholder-color;
|
|
73
|
+
// Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526.
|
|
74
|
+
opacity: 1;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Disabled inputs
|
|
78
|
+
//
|
|
79
|
+
// HTML5 says that controls under a fieldset > legend:first-child won't be
|
|
80
|
+
// disabled if the fieldset is disabled. Due to implementation difficulty, we
|
|
81
|
+
// don't honor that edge case; we style them as disabled anyway.
|
|
82
|
+
&:disabled {
|
|
83
|
+
color: $input-disabled-color;
|
|
84
|
+
background-color: $input-disabled-bg;
|
|
85
|
+
border-color: $input-disabled-border-color;
|
|
86
|
+
// iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
|
|
87
|
+
opacity: 1;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// File input buttons theming
|
|
91
|
+
&::file-selector-button {
|
|
92
|
+
padding: $input-padding-y $input-padding-x;
|
|
93
|
+
margin: (-$input-padding-y) (-$input-padding-x);
|
|
94
|
+
margin-inline-end: $input-padding-x;
|
|
95
|
+
color: $form-file-button-color;
|
|
96
|
+
@include gradient-bg($form-file-button-bg);
|
|
97
|
+
pointer-events: none;
|
|
98
|
+
border-color: inherit;
|
|
99
|
+
border-style: solid;
|
|
100
|
+
border-width: 0;
|
|
101
|
+
border-inline-end-width: $input-border-width;
|
|
102
|
+
border-radius: 0; // stylelint-disable-line property-disallowed-list
|
|
103
|
+
@include transition($btn-transition);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&:hover:not(:disabled):not([readonly])::file-selector-button {
|
|
107
|
+
background-color: $form-file-button-hover-bg;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Readonly controls as plain text
|
|
112
|
+
//
|
|
113
|
+
// Apply class to a readonly input to make it appear like regular plain
|
|
114
|
+
// text (without any border, background color, focus indicator)
|
|
115
|
+
|
|
116
|
+
.form-control-plaintext {
|
|
117
|
+
display: block;
|
|
118
|
+
width: 100%;
|
|
119
|
+
padding: $input-padding-y 0;
|
|
120
|
+
margin-bottom: 0; // match inputs if this class comes on inputs with default margins
|
|
121
|
+
line-height: $input-line-height;
|
|
122
|
+
color: $input-plaintext-color;
|
|
123
|
+
background-color: transparent;
|
|
124
|
+
border: solid transparent;
|
|
125
|
+
border-width: $input-border-width 0;
|
|
126
|
+
|
|
127
|
+
&:focus {
|
|
128
|
+
outline: 0;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&.form-control-sm,
|
|
132
|
+
&.form-control-lg {
|
|
133
|
+
padding-right: 0;
|
|
134
|
+
padding-left: 0;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Form control sizing
|
|
139
|
+
//
|
|
140
|
+
// Build on `.form-control` with modifier classes to decrease or increase the
|
|
141
|
+
// height and font-size of form controls.
|
|
142
|
+
//
|
|
143
|
+
// Repeated in `_input_group.scss` to avoid Sass extend issues.
|
|
144
|
+
|
|
145
|
+
.form-control-sm {
|
|
146
|
+
min-height: $input-height-sm;
|
|
147
|
+
padding: $input-padding-y-sm $input-padding-x-sm;
|
|
148
|
+
font-size: $input-font-size-sm;
|
|
149
|
+
@include border-radius($input-border-radius-sm);
|
|
150
|
+
|
|
151
|
+
&::file-selector-button {
|
|
152
|
+
padding: $input-padding-y-sm $input-padding-x-sm;
|
|
153
|
+
margin: (-$input-padding-y-sm) (-$input-padding-x-sm);
|
|
154
|
+
margin-inline-end: $input-padding-x-sm;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.form-control-lg {
|
|
159
|
+
min-height: $input-height-lg;
|
|
160
|
+
padding: $input-padding-y-lg $input-padding-x-lg;
|
|
161
|
+
font-size: $input-font-size-lg;
|
|
162
|
+
@include border-radius($input-border-radius-lg);
|
|
163
|
+
|
|
164
|
+
&::file-selector-button {
|
|
165
|
+
padding: $input-padding-y-lg $input-padding-x-lg;
|
|
166
|
+
margin: (-$input-padding-y-lg) (-$input-padding-x-lg);
|
|
167
|
+
margin-inline-end: $input-padding-x-lg;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// Make sure textareas don't shrink too much when resized
|
|
172
|
+
// https://github.com/twbs/bootstrap/pull/29124
|
|
173
|
+
// stylelint-disable selector-no-qualifying-type
|
|
174
|
+
textarea {
|
|
175
|
+
&.form-control {
|
|
176
|
+
min-height: $input-height;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&.form-control-sm {
|
|
180
|
+
min-height: $input-height-sm;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
&.form-control-lg {
|
|
184
|
+
min-height: $input-height-lg;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// stylelint-enable selector-no-qualifying-type
|
|
189
|
+
|
|
190
|
+
.form-control-color {
|
|
191
|
+
width: $form-color-width;
|
|
192
|
+
height: $input-height;
|
|
193
|
+
padding: $input-padding-y;
|
|
194
|
+
|
|
195
|
+
&:not(:disabled):not([readonly]) {
|
|
196
|
+
cursor: pointer;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
&::-moz-color-swatch {
|
|
200
|
+
border: 0 !important; // stylelint-disable-line declaration-no-important
|
|
201
|
+
@include border-radius($input-border-radius);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
&::-webkit-color-swatch {
|
|
205
|
+
border: 0 !important; // stylelint-disable-line declaration-no-important
|
|
206
|
+
@include border-radius($input-border-radius);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
&.form-control-sm {
|
|
210
|
+
height: $input-height-sm;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
&.form-control-lg {
|
|
214
|
+
height: $input-height-lg;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// Range
|
|
2
|
+
//
|
|
3
|
+
// Style range inputs the same across browsers. Vendor-specific rules for pseudo
|
|
4
|
+
// elements cannot be mixed. As such, there are no shared styles for focus or
|
|
5
|
+
// active states on prefixed selectors.
|
|
6
|
+
|
|
7
|
+
.form-range {
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: add($form-range-thumb-height, $form-range-thumb-focus-box-shadow-width * 2);
|
|
10
|
+
padding: 0; // Need to reset padding
|
|
11
|
+
background-color: transparent;
|
|
12
|
+
appearance: none;
|
|
13
|
+
|
|
14
|
+
&:focus {
|
|
15
|
+
outline: 0;
|
|
16
|
+
|
|
17
|
+
// Pseudo-elements must be split across multiple rulesets to have an effect.
|
|
18
|
+
// No box-shadow() mixin for focus accessibility.
|
|
19
|
+
&::-webkit-slider-thumb { box-shadow: $form-range-thumb-focus-box-shadow; }
|
|
20
|
+
&::-moz-range-thumb { box-shadow: $form-range-thumb-focus-box-shadow; }
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&::-moz-focus-outer {
|
|
24
|
+
border: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&::-webkit-slider-thumb {
|
|
28
|
+
width: $form-range-thumb-width;
|
|
29
|
+
height: $form-range-thumb-height;
|
|
30
|
+
margin-top: ($form-range-track-height - $form-range-thumb-height) * .5; // Webkit specific
|
|
31
|
+
@include gradient-bg($form-range-thumb-bg);
|
|
32
|
+
border: $form-range-thumb-border;
|
|
33
|
+
@include border-radius($form-range-thumb-border-radius);
|
|
34
|
+
@include box-shadow($form-range-thumb-box-shadow);
|
|
35
|
+
@include transition($form-range-thumb-transition);
|
|
36
|
+
appearance: none;
|
|
37
|
+
|
|
38
|
+
&:active {
|
|
39
|
+
@include gradient-bg($form-range-thumb-active-bg);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&::-webkit-slider-runnable-track {
|
|
44
|
+
width: $form-range-track-width;
|
|
45
|
+
height: $form-range-track-height;
|
|
46
|
+
color: transparent; // Why?
|
|
47
|
+
cursor: $form-range-track-cursor;
|
|
48
|
+
background-color: $form-range-track-bg;
|
|
49
|
+
border-color: transparent;
|
|
50
|
+
@include border-radius($form-range-track-border-radius);
|
|
51
|
+
@include box-shadow($form-range-track-box-shadow);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&::-moz-range-thumb {
|
|
55
|
+
width: $form-range-thumb-width;
|
|
56
|
+
height: $form-range-thumb-height;
|
|
57
|
+
@include gradient-bg($form-range-thumb-bg);
|
|
58
|
+
border: $form-range-thumb-border;
|
|
59
|
+
@include border-radius($form-range-thumb-border-radius);
|
|
60
|
+
@include box-shadow($form-range-thumb-box-shadow);
|
|
61
|
+
@include transition($form-range-thumb-transition);
|
|
62
|
+
appearance: none;
|
|
63
|
+
|
|
64
|
+
&:active {
|
|
65
|
+
@include gradient-bg($form-range-thumb-active-bg);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&::-moz-range-track {
|
|
70
|
+
width: $form-range-track-width;
|
|
71
|
+
height: $form-range-track-height;
|
|
72
|
+
color: transparent;
|
|
73
|
+
cursor: $form-range-track-cursor;
|
|
74
|
+
background-color: $form-range-track-bg;
|
|
75
|
+
border-color: transparent; // Firefox specific?
|
|
76
|
+
@include border-radius($form-range-track-border-radius);
|
|
77
|
+
@include box-shadow($form-range-track-box-shadow);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&:disabled {
|
|
81
|
+
pointer-events: none;
|
|
82
|
+
|
|
83
|
+
&::-webkit-slider-thumb {
|
|
84
|
+
background-color: $form-range-thumb-disabled-bg;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&::-moz-range-thumb {
|
|
88
|
+
background-color: $form-range-thumb-disabled-bg;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// Select
|
|
2
|
+
//
|
|
3
|
+
// Replaces the browser default select with a custom one, mostly pulled from
|
|
4
|
+
// https://primer.github.io/.
|
|
5
|
+
|
|
6
|
+
.form-select {
|
|
7
|
+
--gtr-form-select-bg-img: #{escape-svg($form-select-indicator)};
|
|
8
|
+
|
|
9
|
+
display: block;
|
|
10
|
+
width: 100%;
|
|
11
|
+
padding: $form-select-padding-y $form-select-indicator-padding $form-select-padding-y $form-select-padding-x;
|
|
12
|
+
font-family: $form-select-font-family;
|
|
13
|
+
font-size: $form-select-font-size;
|
|
14
|
+
font-weight: $form-select-font-weight;
|
|
15
|
+
line-height: $form-select-line-height;
|
|
16
|
+
color: $form-select-color;
|
|
17
|
+
background-color: $form-select-bg;
|
|
18
|
+
background-image: var(--gtr-form-select-bg-img), var(--gtr-form-select-bg-icon, none);
|
|
19
|
+
background-repeat: no-repeat;
|
|
20
|
+
background-position: $form-select-bg-position;
|
|
21
|
+
background-size: $form-select-bg-size;
|
|
22
|
+
border: $form-select-border-width solid $form-select-border-color;
|
|
23
|
+
@include border-radius($form-select-border-radius, 0);
|
|
24
|
+
@include box-shadow($form-select-box-shadow);
|
|
25
|
+
@include transition($form-select-transition);
|
|
26
|
+
appearance: none;
|
|
27
|
+
|
|
28
|
+
&:focus {
|
|
29
|
+
border-color: $form-select-focus-border-color;
|
|
30
|
+
outline: 0;
|
|
31
|
+
// Avoid using mixin so we can pass custom focus shadow properly
|
|
32
|
+
box-shadow: $form-select-focus-box-shadow;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&[multiple],
|
|
36
|
+
&[size]:not([size="1"]) {
|
|
37
|
+
padding-right: $form-select-padding-x;
|
|
38
|
+
background-image: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:disabled {
|
|
42
|
+
color: $form-select-disabled-color;
|
|
43
|
+
background-color: $form-select-disabled-bg;
|
|
44
|
+
border-color: $form-select-disabled-border-color;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Remove outline from select box in FF
|
|
48
|
+
&:-moz-focusring {
|
|
49
|
+
color: transparent;
|
|
50
|
+
text-shadow: 0 0 0 $form-select-color;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.form-select-sm {
|
|
55
|
+
padding-top: $form-select-padding-y-sm;
|
|
56
|
+
padding-bottom: $form-select-padding-y-sm;
|
|
57
|
+
padding-left: $form-select-padding-x-sm;
|
|
58
|
+
font-size: $form-select-font-size-sm;
|
|
59
|
+
@include border-radius($form-select-border-radius-sm);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.form-select-lg {
|
|
63
|
+
padding-top: $form-select-padding-y-lg;
|
|
64
|
+
padding-bottom: $form-select-padding-y-lg;
|
|
65
|
+
padding-left: $form-select-padding-x-lg;
|
|
66
|
+
font-size: $form-select-font-size-lg;
|
|
67
|
+
@include border-radius($form-select-border-radius-lg);
|
|
68
|
+
}
|
|
69
|
+
|
|
@@ -0,0 +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
|
+
> .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
|
+
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
|
+
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
|
+
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: calc(#{$input-border-width} * -1); // stylelint-disable-line function-disallowed-list
|
|
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
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Labels
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
.form-label {
|
|
6
|
+
margin-bottom: $form-label-margin-bottom;
|
|
7
|
+
font-size: $form-label-font-size;
|
|
8
|
+
font-style: $form-label-font-style;
|
|
9
|
+
font-weight: $form-label-font-weight;
|
|
10
|
+
color: $form-label-color;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// For use with horizontal and inline forms, when you need the label (or legend)
|
|
14
|
+
// text to align with the form controls.
|
|
15
|
+
.col-form-label {
|
|
16
|
+
padding-top: add($input-padding-y, $input-border-width);
|
|
17
|
+
padding-bottom: add($input-padding-y, $input-border-width);
|
|
18
|
+
margin-bottom: 0; // Override the `<legend>` default
|
|
19
|
+
font-size: inherit; // Override the `<legend>` default
|
|
20
|
+
font-style: $form-label-font-style;
|
|
21
|
+
font-weight: $form-label-font-weight;
|
|
22
|
+
line-height: $input-line-height;
|
|
23
|
+
color: $form-label-color;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.col-form-label-lg {
|
|
27
|
+
padding-top: add($input-padding-y-lg, $input-border-width);
|
|
28
|
+
padding-bottom: add($input-padding-y-lg, $input-border-width);
|
|
29
|
+
font-size: $input-font-size-lg;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.col-form-label-sm {
|
|
33
|
+
padding-top: add($input-padding-y-sm, $input-border-width);
|
|
34
|
+
padding-bottom: add($input-padding-y-sm, $input-border-width);
|
|
35
|
+
font-size: $input-font-size-sm;
|
|
36
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Form validation
|
|
2
|
+
//
|
|
3
|
+
// Provide feedback to users when form field values are valid or invalid. Works
|
|
4
|
+
// primarily for client-side validation via scoped `:invalid` and `:valid`
|
|
5
|
+
// pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for
|
|
6
|
+
// server-side validation.
|
|
7
|
+
|
|
8
|
+
// scss-docs-start form-validation-states-loop
|
|
9
|
+
@each $state, $data in $form-validation-states {
|
|
10
|
+
@include form-validation-state($state, $data...);
|
|
11
|
+
}
|
|
12
|
+
// scss-docs-end form-validation-states-loop
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@include deprecate("`alert-variant()`", "v5.3.0", "v6.0.0");
|
|
2
|
+
|
|
3
|
+
// scss-docs-start alert-variant-mixin
|
|
4
|
+
@mixin alert-variant($background, $border, $color) {
|
|
5
|
+
--gtr-alert-color: #{$color};
|
|
6
|
+
--gtr-alert-bg: #{$background};
|
|
7
|
+
--gtr-alert-border-color: #{$border};
|
|
8
|
+
--gtr-alert-link-color: #{shade-color($color, 20%)};
|
|
9
|
+
|
|
10
|
+
.alert-link {
|
|
11
|
+
color: var(--gtr-alert-link-color);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
// scss-docs-end alert-variant-mixin
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Shared between modals and offcanvases
|
|
2
|
+
@mixin overlay-backdrop($zindex, $backdrop-bg, $backdrop-opacity) {
|
|
3
|
+
position: fixed;
|
|
4
|
+
top: 0;
|
|
5
|
+
left: 0;
|
|
6
|
+
z-index: $zindex;
|
|
7
|
+
width: 100vw;
|
|
8
|
+
height: 100vh;
|
|
9
|
+
background-color: $backdrop-bg;
|
|
10
|
+
|
|
11
|
+
// Fade for backdrop
|
|
12
|
+
&.fade { opacity: 0; }
|
|
13
|
+
&.show { opacity: $backdrop-opacity; }
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@mixin box-shadow($shadow...) {
|
|
2
|
+
$result: ();
|
|
3
|
+
|
|
4
|
+
@each $value in $shadow {
|
|
5
|
+
@if $value != null {
|
|
6
|
+
$result: append($result, $value, "comma");
|
|
7
|
+
}
|
|
8
|
+
@if $value == none and length($shadow) > 1 {
|
|
9
|
+
@warn "The keyword 'none' must be used as a single argument.";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@if (length($result) > 0) {
|
|
14
|
+
box-shadow: $result;
|
|
15
|
+
}
|
|
16
|
+
}
|