@ch-post-common/common-web-frontend 0.0.1-security → 934.952.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of @ch-post-common/common-web-frontend might be problematic. Click here for more details.
- package/components/accordion.scss +177 -0
- package/components/alert.scss +217 -0
- package/components/badge.scss +95 -0
- package/components/breadcrumb.scss +43 -0
- package/components/button.scss +168 -0
- package/components/card.scss +227 -0
- package/components/carousel.scss +161 -0
- package/components/custom-choice-control.scss +217 -0
- package/components/custom-range-input.scss +51 -0
- package/components/custom-select.scss +60 -0
- package/components/datatable.scss +147 -0
- package/components/datepicker.scss +220 -0
- package/components/detail-summary.scss +72 -0
- package/components/dropdown.scss +71 -0
- package/components/floating-label.scss +65 -0
- package/components/fonts.scss +35 -0
- package/components/form-feedback.scss +70 -0
- package/components/forms.scss +31 -0
- package/components/grid.scss +103 -0
- package/components/icons.scss +62 -0
- package/components/intranet-header/_icon.scss +6 -0
- package/components/intranet-header/_language-chooser.scss +40 -0
- package/components/intranet-header/_logo.scss +74 -0
- package/components/intranet-header/_nav-overflow.scss +56 -0
- package/components/intranet-header/_scaffolding.scss +96 -0
- package/components/intranet-header/_searchbox.scss +56 -0
- package/components/intranet-header/_settings.scss +23 -0
- package/components/intranet-header/_sidebar.scss +118 -0
- package/components/intranet-header/_top-navigation.scss +83 -0
- package/components/list-group.scss +156 -0
- package/components/modal.scss +87 -0
- package/components/pagination.scss +67 -0
- package/components/popover.scss +21 -0
- package/components/product-card.scss +74 -0
- package/components/progress.scss +15 -0
- package/components/reboot.scss +17 -0
- package/components/root.scss +10 -0
- package/components/sizing.scss +90 -0
- package/components/spinner.scss +58 -0
- package/components/stepper.scss +158 -0
- package/components/subnavigation.scss +131 -0
- package/components/switch.scss +132 -0
- package/components/tabs.scss +122 -0
- package/components/timepicker.scss +110 -0
- package/components/toast.scss +172 -0
- package/components/tooltip.scss +23 -0
- package/components/topic-teaser.scss +133 -0
- package/components/type.scss +106 -0
- package/components/utilities.scss +93 -0
- package/index.js +28 -0
- package/layouts/portal/_type.scss +83 -0
- package/lic/_bootstrap-license.scss +29 -0
- package/lic/_cwf-license.scss +7 -0
- package/mixins/_animation.scss +39 -0
- package/mixins/_button.scss +232 -0
- package/mixins/_forms.scss +188 -0
- package/mixins/_icons.scss +27 -0
- package/mixins/_scroll-shadows.scss +13 -0
- package/mixins/_size.scss +69 -0
- package/mixins/_type.scss +187 -0
- package/mixins/_utilities.scss +73 -0
- package/package.json +11 -3
- package/placeholders/_dropdown.scss +11 -0
- package/placeholders/_floating-label.scss +143 -0
- package/placeholders/_notifications.scss +160 -0
- package/placeholders/_text.scss +187 -0
- package/variables/_animation.scss +36 -0
- package/variables/_color.scss +240 -0
- package/variables/_commons.scss +57 -0
- package/variables/_icons.scss +2071 -0
- package/variables/_spacing.scss +180 -0
- package/variables/_type.scss +157 -0
- package/variables/components/_accordion.scss +22 -0
- package/variables/components/_alert.scss +50 -0
- package/variables/components/_badge.scss +29 -0
- package/variables/components/_breadcrumbs.scss +21 -0
- package/variables/components/_button.scss +152 -0
- package/variables/components/_card.scss +29 -0
- package/variables/components/_carousel.scss +27 -0
- package/variables/components/_close.scss +9 -0
- package/variables/components/_datatable.scss +49 -0
- package/variables/components/_datepicker.scss +14 -0
- package/variables/components/_dropdowns.scss +30 -0
- package/variables/components/_forms.scss +256 -0
- package/variables/components/_intranet-header.scss +9 -0
- package/variables/components/_modals.scss +68 -0
- package/variables/components/_nav.scss +82 -0
- package/variables/components/_pagination.scss +41 -0
- package/variables/components/_paragraph.scss +6 -0
- package/variables/components/_popovers.scss +28 -0
- package/variables/components/_progress-bars.scss +16 -0
- package/variables/components/_stepper.scss +26 -0
- package/variables/components/_subnavigation.scss +36 -0
- package/variables/components/_switch.scss +3 -0
- package/variables/components/_tables.scss +31 -0
- package/variables/components/_tooltips.scss +26 -0
- package/README.md +0 -5
@@ -0,0 +1,227 @@
|
|
1
|
+
@forward "../variables/options";
|
2
|
+
|
3
|
+
@use "../lic/bootstrap-license";
|
4
|
+
@use "../themes/bootstrap/overrides" as bootstrap;
|
5
|
+
@use "../themes/bootstrap/card" as bootstrap-card;
|
6
|
+
@use "../variables/color";
|
7
|
+
@use "../variables/spacing";
|
8
|
+
@use "../variables/commons";
|
9
|
+
@use "../variables/components/card";
|
10
|
+
@use "../functions/sizing";
|
11
|
+
@use "../mixins/icons" as icons-mixins;
|
12
|
+
@use "../variables/icons";
|
13
|
+
@use "../variables/animation";
|
14
|
+
|
15
|
+
.card-group {
|
16
|
+
margin-top: commons.$border-width;
|
17
|
+
margin-left: commons.$border-width;
|
18
|
+
}
|
19
|
+
|
20
|
+
.card {
|
21
|
+
border: none;
|
22
|
+
border-radius: 0;
|
23
|
+
box-shadow: commons.$box-shadow-lg;
|
24
|
+
// Outline with card-group margin trick prevents double/jumping (on hover) borders
|
25
|
+
outline: 1px solid card.$card-border-color;
|
26
|
+
transition: box-shadow .25s;
|
27
|
+
z-index: 0;
|
28
|
+
|
29
|
+
|
30
|
+
&.product-card,
|
31
|
+
&.card-button {
|
32
|
+
box-shadow: none;
|
33
|
+
|
34
|
+
&:hover,
|
35
|
+
&:focus {
|
36
|
+
box-shadow: commons.$box-shadow-lg;
|
37
|
+
z-index: 1;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
.card-columns & {
|
42
|
+
// make sure box-shadow is on the same column as the card
|
43
|
+
margin-top: sizing.calculate-single-box-shadow-size(commons.$box-shadow-lg);
|
44
|
+
margin-bottom: sizing.calculate-single-box-shadow-size(commons.$box-shadow-lg);
|
45
|
+
}
|
46
|
+
|
47
|
+
.card-group > & {
|
48
|
+
margin-right: commons.$border-width;
|
49
|
+
margin-bottom: commons.$border-width;
|
50
|
+
}
|
51
|
+
|
52
|
+
.list-group-item {
|
53
|
+
padding: 1.25rem 1rem;
|
54
|
+
border-color: card.$card-border-color;
|
55
|
+
}
|
56
|
+
|
57
|
+
.link-icon {
|
58
|
+
text-decoration: none;
|
59
|
+
}
|
60
|
+
|
61
|
+
.link-icon .pi {
|
62
|
+
margin-right: .5rem;
|
63
|
+
}
|
64
|
+
|
65
|
+
& > .list-group + .card-footer,
|
66
|
+
& .card-body ~ .card-body {
|
67
|
+
border-top: 1px solid color.$gray-200;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
// Card elements have paddings, prevent double spacing by removing
|
72
|
+
// elements margins
|
73
|
+
.card-header,
|
74
|
+
.card-body,
|
75
|
+
.card-footer,
|
76
|
+
.list-group-item {
|
77
|
+
& > *:first-child {
|
78
|
+
margin-top: 0;
|
79
|
+
}
|
80
|
+
|
81
|
+
& > *:last-child {
|
82
|
+
margin-bottom: 0;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
.card-header,
|
87
|
+
.card-footer,
|
88
|
+
.card-body {
|
89
|
+
padding: 1.25rem 1rem;
|
90
|
+
|
91
|
+
.product-card &,
|
92
|
+
.card-button & {
|
93
|
+
@include bootstrap.media-breakpoint-down(sm) {
|
94
|
+
padding: spacing.$size-regular;
|
95
|
+
}
|
96
|
+
|
97
|
+
@include bootstrap.media-breakpoint-between(sm, md) {
|
98
|
+
padding: spacing.$size-large;
|
99
|
+
}
|
100
|
+
|
101
|
+
@include bootstrap.media-breakpoint-between(md, xxl) {
|
102
|
+
padding: spacing.$size-big;
|
103
|
+
}
|
104
|
+
|
105
|
+
@include bootstrap.media-breakpoint-up(xxl) {
|
106
|
+
padding: spacing.$size-bigger-big;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
|
110
|
+
.card-white & {
|
111
|
+
background: color.$white;
|
112
|
+
}
|
113
|
+
}
|
114
|
+
|
115
|
+
.card-header {
|
116
|
+
align-items: center;
|
117
|
+
|
118
|
+
& > *:not(:last-child) {
|
119
|
+
margin-right: 1rem;
|
120
|
+
}
|
121
|
+
}
|
122
|
+
|
123
|
+
.product-card {
|
124
|
+
text-decoration: none;
|
125
|
+
|
126
|
+
&:hover,
|
127
|
+
&:focus {
|
128
|
+
color: inherit;
|
129
|
+
text-decoration: none;
|
130
|
+
}
|
131
|
+
|
132
|
+
.link-icon {
|
133
|
+
display: flex;
|
134
|
+
align-items: center;
|
135
|
+
opacity: .75;
|
136
|
+
transition: opacity 250ms;
|
137
|
+
|
138
|
+
&:hover,
|
139
|
+
&:focus {
|
140
|
+
opacity: 1;
|
141
|
+
}
|
142
|
+
}
|
143
|
+
}
|
144
|
+
|
145
|
+
// TODO: make this flexible with classes or something
|
146
|
+
.card-columns {
|
147
|
+
column-count: 2;
|
148
|
+
@include bootstrap.media-breakpoint-down(md) {
|
149
|
+
column-count: 1;
|
150
|
+
}
|
151
|
+
}
|
152
|
+
|
153
|
+
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
154
|
+
.card {
|
155
|
+
img {
|
156
|
+
height: 100%;
|
157
|
+
}
|
158
|
+
}
|
159
|
+
|
160
|
+
.card-deck .card,
|
161
|
+
.card-group .card {
|
162
|
+
img {
|
163
|
+
height: auto;
|
164
|
+
max-height: 50%;
|
165
|
+
}
|
166
|
+
|
167
|
+
& > .card-header,
|
168
|
+
& > .card-footer {
|
169
|
+
flex: 0 0 auto;
|
170
|
+
}
|
171
|
+
}
|
172
|
+
}
|
173
|
+
|
174
|
+
.card-links {
|
175
|
+
display: flex;
|
176
|
+
justify-content: space-between;
|
177
|
+
padding-right: .5rem;
|
178
|
+
padding-left: .5rem;
|
179
|
+
flex-wrap: wrap;
|
180
|
+
|
181
|
+
a {
|
182
|
+
color: color.$gray-600;
|
183
|
+
text-decoration: none;
|
184
|
+
display: -ms-inline-flexbox;
|
185
|
+
display: inline-flex;
|
186
|
+
-ms-flex-align: center;
|
187
|
+
align-items: center;
|
188
|
+
padding-left: .5rem;
|
189
|
+
padding-right: .5rem;
|
190
|
+
|
191
|
+
&::before {
|
192
|
+
@include icons-mixins.pi(3020, color.$gray-800);
|
193
|
+
content: "";
|
194
|
+
position: relative;
|
195
|
+
opacity: .8;
|
196
|
+
margin-right: spacing.$spacer/2;
|
197
|
+
|
198
|
+
vertical-align: middle;
|
199
|
+
display: inline-block;
|
200
|
+
width: icons.$icon-size-default;
|
201
|
+
height: icons.$icon-size-default;
|
202
|
+
background-size: contain;
|
203
|
+
background-repeat: no-repeat;
|
204
|
+
background-position: center center;
|
205
|
+
|
206
|
+
transition: animation.$transition-fade;
|
207
|
+
}
|
208
|
+
|
209
|
+
&:hover,
|
210
|
+
&:focus {
|
211
|
+
color: black;
|
212
|
+
|
213
|
+
&::before {
|
214
|
+
opacity: 1;
|
215
|
+
}
|
216
|
+
}
|
217
|
+
}
|
218
|
+
}
|
219
|
+
|
220
|
+
.card-button {
|
221
|
+
&.text-auto {
|
222
|
+
a:hover,
|
223
|
+
a:focus {
|
224
|
+
opacity: 1;
|
225
|
+
}
|
226
|
+
}
|
227
|
+
}
|
@@ -0,0 +1,161 @@
|
|
1
|
+
@forward "../variables/options";
|
2
|
+
|
3
|
+
@use "../lic/bootstrap-license";
|
4
|
+
@use "../themes/bootstrap/carousel" as bc;
|
5
|
+
@use "../themes/bootstrap/overrides" as bootstrap;
|
6
|
+
|
7
|
+
@use "../functions/icons";
|
8
|
+
@use "../variables/color";
|
9
|
+
@use "../variables/type";
|
10
|
+
@use "../variables/spacing";
|
11
|
+
|
12
|
+
.carousel {
|
13
|
+
&:focus-visible {
|
14
|
+
outline: transparent;
|
15
|
+
box-shadow: 0px 0px 0px 2px #ffffff, 0px 0px 0px 4px #000000,
|
16
|
+
0px 0px 12px 5px rgba(0, 0, 0, 0.24);
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
.carousel-inner {
|
21
|
+
padding-bottom: calc(10% - 0.5rem);
|
22
|
+
|
23
|
+
@include bootstrap.media-breakpoint-down(rg) {
|
24
|
+
padding-bottom: 1.5rem;
|
25
|
+
}
|
26
|
+
|
27
|
+
@include bootstrap.media-breakpoint-down(md) {
|
28
|
+
padding-bottom: calc(10% - 1rem);
|
29
|
+
}
|
30
|
+
|
31
|
+
img {
|
32
|
+
aspect-ratio: 16/9;
|
33
|
+
object-fit: cover;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
.carousel-caption {
|
38
|
+
background-color: rgba(color.$nightblue-dark, 0.85);
|
39
|
+
color: color.$white;
|
40
|
+
width: 40%;
|
41
|
+
left: 0;
|
42
|
+
bottom: -5rem;
|
43
|
+
text-align: left;
|
44
|
+
padding: 2rem;
|
45
|
+
padding-bottom: 5rem;
|
46
|
+
|
47
|
+
@include bootstrap.media-breakpoint-up(lg) {
|
48
|
+
bottom: -7rem;
|
49
|
+
}
|
50
|
+
|
51
|
+
@include bootstrap.media-breakpoint-down(lg) {
|
52
|
+
padding: 1.5rem;
|
53
|
+
padding-bottom: 5rem;
|
54
|
+
width: 50%;
|
55
|
+
}
|
56
|
+
|
57
|
+
@include bootstrap.media-breakpoint-down(md) {
|
58
|
+
width: 55%;
|
59
|
+
}
|
60
|
+
|
61
|
+
@include bootstrap.media-breakpoint-down(rg) {
|
62
|
+
bottom: 0;
|
63
|
+
position: relative;
|
64
|
+
margin-top: -7rem;
|
65
|
+
width: 75%;
|
66
|
+
}
|
67
|
+
|
68
|
+
@include bootstrap.media-breakpoint-down(sm) {
|
69
|
+
margin-top: -3rem;
|
70
|
+
width: calc(100% - 2rem);
|
71
|
+
margin-left: 1rem;
|
72
|
+
}
|
73
|
+
|
74
|
+
.bold {
|
75
|
+
font-size: type.$font-size-small-big;
|
76
|
+
font-weight: type.$font-weight-bold;
|
77
|
+
margin-bottom: 0;
|
78
|
+
}
|
79
|
+
|
80
|
+
.subtitle,
|
81
|
+
.light {
|
82
|
+
font-size: type.$font-size-small-big;
|
83
|
+
font-weight: type.$font-weight-light;
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
87
|
+
.carousel-caption:before {
|
88
|
+
content: "";
|
89
|
+
position: absolute;
|
90
|
+
bottom: 3rem;
|
91
|
+
left: 0;
|
92
|
+
border-bottom: 10px solid color.$yellow;
|
93
|
+
width: 192px; //width from logo
|
94
|
+
z-index: 0;
|
95
|
+
|
96
|
+
@include bootstrap.media-breakpoint-down(lg) {
|
97
|
+
bottom: 2.5rem;
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
101
|
+
.caption-right .carousel-caption {
|
102
|
+
left: auto;
|
103
|
+
right: 0;
|
104
|
+
}
|
105
|
+
|
106
|
+
.caption-light .carousel-caption {
|
107
|
+
background-color: rgba(color.$gray-cararra, 0.85);
|
108
|
+
color: color.$black;
|
109
|
+
}
|
110
|
+
|
111
|
+
.carousel-indicators {
|
112
|
+
text-align: right;
|
113
|
+
float: right;
|
114
|
+
bottom: spacing.$size-huge;
|
115
|
+
right: 2%;
|
116
|
+
left: inherit;
|
117
|
+
margin: 0;
|
118
|
+
|
119
|
+
@include bootstrap.media-breakpoint-down(lg) {
|
120
|
+
bottom: 2rem;
|
121
|
+
}
|
122
|
+
|
123
|
+
@include bootstrap.media-breakpoint-down(rg) {
|
124
|
+
bottom: 1.5rem;
|
125
|
+
}
|
126
|
+
|
127
|
+
@include bootstrap.media-breakpoint-down(sm) {
|
128
|
+
right: 0;
|
129
|
+
left: 0;
|
130
|
+
bottom: 0.8rem;
|
131
|
+
}
|
132
|
+
}
|
133
|
+
|
134
|
+
.caption-right .carousel-indicators {
|
135
|
+
text-align: left;
|
136
|
+
float: left;
|
137
|
+
left: 2%;
|
138
|
+
right: auto;
|
139
|
+
}
|
140
|
+
|
141
|
+
.carousel-indicators li {
|
142
|
+
border: 1px color.$black solid;
|
143
|
+
border-radius: 50%;
|
144
|
+
width: 0.75rem;
|
145
|
+
height: 0.75rem;
|
146
|
+
background-color: transparent;
|
147
|
+
|
148
|
+
&:not(:last-child) {
|
149
|
+
margin-right: spacing.$size-regular;
|
150
|
+
}
|
151
|
+
}
|
152
|
+
|
153
|
+
.carousel-indicators li.active {
|
154
|
+
border-color: color.$yellow;
|
155
|
+
background-color: color.$yellow;
|
156
|
+
}
|
157
|
+
|
158
|
+
.carousel-control-prev,
|
159
|
+
.carousel-control-next {
|
160
|
+
display: none;
|
161
|
+
}
|
@@ -0,0 +1,217 @@
|
|
1
|
+
@forward "../variables/options";
|
2
|
+
|
3
|
+
@use "sass:map";
|
4
|
+
|
5
|
+
@use "../lic/bootstrap-license";
|
6
|
+
@use "../themes/bootstrap/overrides" as *;
|
7
|
+
@use "../themes/bootstrap/custom-forms";
|
8
|
+
|
9
|
+
@use "../functions/sizing";
|
10
|
+
@use "../variables/color";
|
11
|
+
@use "../variables/commons";
|
12
|
+
@use "../variables/type";
|
13
|
+
@use "../variables/grid";
|
14
|
+
@use "../variables/spacing";
|
15
|
+
@use "../variables/components/forms";
|
16
|
+
@use "../variables/icons";
|
17
|
+
@use "../functions/icons" as fi;
|
18
|
+
|
19
|
+
// Custom Labels
|
20
|
+
.custom-control-label {
|
21
|
+
padding: map.get(spacing.$post-sizes, "micro")
|
22
|
+
map.get(spacing.$post-sizes, "mini");
|
23
|
+
left: forms.$input-border-width; // Offset to display checkboxes and radio-buttons correctly on grid
|
24
|
+
margin-top: calc(#{map.get(spacing.$post-sizes, "mini")} - 1px);
|
25
|
+
margin-bottom: calc(#{map.get(spacing.$post-sizes, "mini")} - 1px);
|
26
|
+
|
27
|
+
@include hover-focus {
|
28
|
+
&::before {
|
29
|
+
border-color: color.$black;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
.custom-control-input:not(:disabled):active ~ & {
|
34
|
+
&::before {
|
35
|
+
background: color.$black-alpha-20;
|
36
|
+
border-color: color.$black;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
&::after,
|
41
|
+
&::before {
|
42
|
+
width: forms.$custom-choice-control-size;
|
43
|
+
height: forms.$custom-choice-control-size;
|
44
|
+
}
|
45
|
+
|
46
|
+
&::before {
|
47
|
+
border: forms.$input-border-width solid color.$black-alpha-60;
|
48
|
+
}
|
49
|
+
|
50
|
+
.custom-control-input:disabled ~ &::before {
|
51
|
+
border-color: color.$black-alpha-60;
|
52
|
+
}
|
53
|
+
|
54
|
+
.custom-control-input:disabled ~ & {
|
55
|
+
color: color.$black-alpha-60;
|
56
|
+
}
|
57
|
+
|
58
|
+
.custom-control-input:disabled ~ &::after {
|
59
|
+
opacity: 0.6;
|
60
|
+
}
|
61
|
+
|
62
|
+
.custom-control-input:checked ~ & {
|
63
|
+
&::before {
|
64
|
+
border-color: color.$black-alpha-60;
|
65
|
+
}
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
69
|
+
// Spacing inside form
|
70
|
+
.custom-checkbox,
|
71
|
+
.custom-radio {
|
72
|
+
&.form-control {
|
73
|
+
$padding-x: calc(#{forms.$input-padding-x} + #{forms.$input-border-width});
|
74
|
+
$padding-y: calc(#{forms.$input-padding-y} - #{forms.$input-height-border});
|
75
|
+
|
76
|
+
padding: $padding-y $padding-x;
|
77
|
+
border: none;
|
78
|
+
|
79
|
+
// This centers the checkbox / radiobutton beside other form-controls, if there is no label on top
|
80
|
+
margin-top: type.$line-height-base + forms.$label-margin-bottom -
|
81
|
+
sizing.px-to-rem(1); // The subtracted pixel is due to the browser rendering of the label
|
82
|
+
|
83
|
+
label ~ & {
|
84
|
+
margin-top: 0;
|
85
|
+
}
|
86
|
+
|
87
|
+
&.form-control-rg {
|
88
|
+
$padding-y-rg: calc(
|
89
|
+
#{forms.$input-padding-y-rg} - #{forms.$input-height-border}
|
90
|
+
);
|
91
|
+
padding: $padding-y-rg $padding-x;
|
92
|
+
}
|
93
|
+
|
94
|
+
// TODO: Adapt spacing for form-control-sm and form-control-lg
|
95
|
+
|
96
|
+
& .custom-control-label {
|
97
|
+
margin: forms.$input-border-width !important;
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
102
|
+
// Radio-Buttons
|
103
|
+
.custom-radio {
|
104
|
+
.custom-control-label {
|
105
|
+
&::after {
|
106
|
+
background-size: forms.$custom-choice-control-size;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
|
110
|
+
.custom-control-input:focus ~ label {
|
111
|
+
&:before {
|
112
|
+
box-shadow: $input-btn-focus-box-shadow;
|
113
|
+
}
|
114
|
+
}
|
115
|
+
|
116
|
+
.custom-control-input:disabled:checked ~ .custom-control-label::before {
|
117
|
+
background-color: inherit;
|
118
|
+
}
|
119
|
+
|
120
|
+
// Styles to improve accessibility in high contrast mode
|
121
|
+
@media (forced-colors: active),
|
122
|
+
/* TODO: remove this IE Rules once Version 5 is out */ (-ms-high-contrast: active),
|
123
|
+
(-ms-high-contrast: white-on-black) {
|
124
|
+
& .custom-control-input:checked + .custom-control-label::after {
|
125
|
+
// escape svg to support IE
|
126
|
+
background-image: url(escape-svg(
|
127
|
+
"data:image/svg+xml;charset=utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-6 -6 12 12'><circle r='3' fill='white'/></svg>"
|
128
|
+
));
|
129
|
+
forced-color-adjust: none;
|
130
|
+
}
|
131
|
+
|
132
|
+
// use color: graytext to highlight the text in the disabled color
|
133
|
+
& .custom-control-input:disabled + .custom-control-label {
|
134
|
+
color: graytext;
|
135
|
+
}
|
136
|
+
|
137
|
+
& .custom-control-input:focus + .custom-control-label::before {
|
138
|
+
outline: 2px solid transparent;
|
139
|
+
}
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
// Checkboxes
|
144
|
+
.custom-checkbox {
|
145
|
+
.custom-control-label {
|
146
|
+
&::before {
|
147
|
+
border-radius: 0;
|
148
|
+
}
|
149
|
+
|
150
|
+
&::after {
|
151
|
+
background-size: 90% 90%;
|
152
|
+
}
|
153
|
+
}
|
154
|
+
|
155
|
+
.custom-control-input {
|
156
|
+
&:checked ~ .custom-control-label::after {
|
157
|
+
// TODO: Can this be replaced by an icon placeholder?
|
158
|
+
background-image: url("data:image/svg+xml;base64,PCEtLSBHZW5lcmF0ZWQgYnkgSWNvTW9vbi5pbyAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIj4NCjx0aXRsZT4zMDM1PC90aXRsZT4NCjxwYXRoIGQ9Ik0xMi42NjcgMjMuNmwtNy4yLTcuMDY3IDEuMDY3LTEuMDY3IDYuMTMzIDYuMjY3IDEyLjgtMTIuOTMzIDEuMDY3IDEuMDY3eiI+PC9wYXRoPg0KPC9zdmc+DQo=");
|
159
|
+
}
|
160
|
+
|
161
|
+
&:disabled:checked ~ .custom-control-label::before {
|
162
|
+
border-color: color.$black-alpha-60;
|
163
|
+
background-color: color.$white-alpha-60;
|
164
|
+
}
|
165
|
+
|
166
|
+
&:focus ~ label {
|
167
|
+
&:before {
|
168
|
+
box-shadow: $input-btn-focus-box-shadow;
|
169
|
+
}
|
170
|
+
}
|
171
|
+
|
172
|
+
&:indeterminate ~ .custom-control-label {
|
173
|
+
@include hover-focus {
|
174
|
+
&::after {
|
175
|
+
border-color: color.$black;
|
176
|
+
}
|
177
|
+
}
|
178
|
+
|
179
|
+
&::after {
|
180
|
+
background-color: color.$white;
|
181
|
+
background-size: 50%;
|
182
|
+
border: forms.$input-border-width solid color.$black-alpha-60;
|
183
|
+
}
|
184
|
+
}
|
185
|
+
}
|
186
|
+
|
187
|
+
// Styles to improve accessibility in high contrast mode
|
188
|
+
@media (forced-colors: active),
|
189
|
+
/* TODO: remove this IE Rules once Version 5 is out */ (-ms-high-contrast: active),
|
190
|
+
(-ms-high-contrast: white-on-black) {
|
191
|
+
& .custom-control-input:checked:disabled + .custom-control-label::before {
|
192
|
+
border-color: graytext;
|
193
|
+
}
|
194
|
+
|
195
|
+
& .custom-control-input:checked + .custom-control-label::after {
|
196
|
+
background-image: url(fi.get-colored-svg-url(2105, color.$white));
|
197
|
+
}
|
198
|
+
|
199
|
+
// use color: graytext to highlight the text in the disabled color
|
200
|
+
& .custom-control-input:disabled + .custom-control-label {
|
201
|
+
color: graytext;
|
202
|
+
}
|
203
|
+
|
204
|
+
& .custom-control-input:focus + .custom-control-label::before {
|
205
|
+
outline: 2px solid transparent;
|
206
|
+
}
|
207
|
+
}
|
208
|
+
}
|
209
|
+
|
210
|
+
.valid-tooltip,
|
211
|
+
.invalid-tooltip {
|
212
|
+
left: $grid-gutter-width / 2;
|
213
|
+
|
214
|
+
.form-row & {
|
215
|
+
left: $form-grid-gutter-width / 2;
|
216
|
+
}
|
217
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
@forward "../variables/options";
|
2
|
+
|
3
|
+
@use "../lic/bootstrap-license";
|
4
|
+
@use "../themes/bootstrap/overrides" as *;
|
5
|
+
@use "../themes/bootstrap/custom-forms" as bcf;
|
6
|
+
|
7
|
+
@use "../variables/color";
|
8
|
+
@use "../variables/components/forms";
|
9
|
+
|
10
|
+
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
11
|
+
.custom-range {
|
12
|
+
height: forms.$custom-range-input-height-ie;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
input[type="range"] {
|
17
|
+
@extend .custom-range;
|
18
|
+
}
|
19
|
+
|
20
|
+
// see https://jira.post.ch/browse/COWF-209
|
21
|
+
|
22
|
+
// https://codepen.io/thebabydino/pen/goYYrN
|
23
|
+
input[type="range"] {
|
24
|
+
--range: calc(var(--max) - var(--min));
|
25
|
+
--ratio: calc((var(--val) - var(--min)) / var(--range));
|
26
|
+
--sx: calc(.5 * 1.5em + var(--ratio) * (100% - 1.5em));
|
27
|
+
}
|
28
|
+
|
29
|
+
// the track in IE is slightly larger: when going at 100%, the thumb does not cover it totally
|
30
|
+
input[type="range"]::-ms-track {
|
31
|
+
width: calc(100% - .2em);
|
32
|
+
}
|
33
|
+
|
34
|
+
input[type="range"]::-webkit-slider-runnable-track {
|
35
|
+
background: linear-gradient(color.$black, color.$black) 0 / var(--sx) 100% no-repeat color.$gray-200;
|
36
|
+
background-color: color.$gray-200;
|
37
|
+
}
|
38
|
+
|
39
|
+
input[type="range"]::-ms-fill-lower {
|
40
|
+
background: color.$black;
|
41
|
+
}
|
42
|
+
|
43
|
+
input[type="range"]::-moz-range-progress {
|
44
|
+
background: color.$black;
|
45
|
+
}
|
46
|
+
|
47
|
+
// for making input align vertically
|
48
|
+
.align-to-custom-range.form-control {
|
49
|
+
position: relative;
|
50
|
+
top: .75rem;
|
51
|
+
}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
@forward "../variables/options";
|
2
|
+
|
3
|
+
@use "../lic/bootstrap-license";
|
4
|
+
@use "../themes/bootstrap/overrides" as *;
|
5
|
+
@use "../themes/bootstrap/custom-forms";
|
6
|
+
@use "../mixins/forms" as forms-mixins;
|
7
|
+
|
8
|
+
@use "../variables/components/forms";
|
9
|
+
|
10
|
+
.custom-select {
|
11
|
+
appearance: none;
|
12
|
+
text-align: left;
|
13
|
+
|
14
|
+
&-rg {
|
15
|
+
height: forms.$custom-select-height-rg;
|
16
|
+
padding-top: forms.$custom-select-padding-y;
|
17
|
+
padding-bottom: forms.$custom-select-padding-y;
|
18
|
+
font-size: forms.$custom-select-font-size-rg;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
select {
|
23
|
+
@extend .custom-select;
|
24
|
+
@extend .custom-control;
|
25
|
+
|
26
|
+
&.form-control-lg ~ label {
|
27
|
+
z-index: 1;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
.dropdown .custom-select {
|
32
|
+
&.form-control ~ .dropdown-menu {
|
33
|
+
min-width: 0;
|
34
|
+
max-width: none;
|
35
|
+
right: 0;
|
36
|
+
left: 0;
|
37
|
+
top: forms.$input-height;
|
38
|
+
}
|
39
|
+
|
40
|
+
&.form-control-sm ~ .dropdown-menu {
|
41
|
+
top: forms.$input-height-sm;
|
42
|
+
}
|
43
|
+
|
44
|
+
&.form-control-rg ~ .dropdown-menu {
|
45
|
+
top: forms.$input-height-rg;
|
46
|
+
}
|
47
|
+
|
48
|
+
&.form-control-lg {
|
49
|
+
& ~ .dropdown-menu {
|
50
|
+
top: forms.$input-height-lg;
|
51
|
+
}
|
52
|
+
|
53
|
+
&:not(:empty),
|
54
|
+
&[aria-expanded=true] {
|
55
|
+
& ~ label:first-of-type {
|
56
|
+
@include forms-mixins.label-floated-style();
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|