@swisspost/design-system-styles 6.6.4 → 7.1.0
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/_svg-icon-map.scss +927 -907
- package/basics.css +1 -1
- package/components/_index.scss +4 -1
- package/components/alert.scss +6 -1
- package/components/badge.scss +25 -78
- package/components/button-group.scss +2 -4
- package/components/button.scss +82 -31
- package/components/card-control.scss +322 -0
- package/components/carousel.scss +1 -1
- package/components/chip.scss +159 -0
- package/components/datepicker.scss +24 -12
- package/components/error-container.scss +9 -0
- package/components/floating-label.scss +0 -1
- package/components/form-check.scss +118 -31
- package/components/form-range.scss +94 -19
- package/components/form-select.scss +64 -15
- package/components/form-validation.scss +32 -13
- package/components/forms.scss +51 -13
- package/components/intranet-header/_sidebar.scss +24 -5
- package/components/sizing.scss +2 -2
- package/components/spinner.scss +6 -12
- package/components/stepper.scss +283 -138
- package/components/subnavigation.scss +2 -5
- package/components/tables.scss +1 -1
- package/components/tabs/_tabs-wrapper.scss +1 -1
- package/components/tag.scss +82 -0
- package/components/topic-teaser.scss +1 -2
- package/components/utilities.scss +0 -2
- package/functions/_color.scss +12 -0
- package/functions/_forms.scss +22 -0
- package/functions/_list.scss +2 -1
- package/functions/_sizing.scss +2 -2
- package/functions/_utilities.scss +3 -3
- package/index.css +3 -3
- package/intranet.css +3 -3
- package/mixins/_accordion.scss +2 -2
- package/mixins/_button.scss +1 -2
- package/mixins/_chip.scss +36 -0
- package/mixins/_forms.scss +1 -0
- package/mixins/_icons.scss +1 -3
- package/mixins/_index.scss +1 -1
- package/mixins/_utilities.scss +85 -0
- package/package.json +15 -15
- package/placeholders/_badge.scss +4 -56
- package/placeholders/_button.scss +2 -0
- package/placeholders/_close.scss +8 -1
- package/placeholders/_color.scss +10 -0
- package/themes/bootstrap/_overrides-color.scss +4 -14
- package/themes/bootstrap/_overrides-variables.scss +1 -0
- package/variables/_color.scss +104 -44
- package/variables/_commons.scss +2 -0
- package/variables/_features.scss +1 -3
- package/variables/_icons.scss +4 -1
- package/variables/_type.scss +9 -1
- package/variables/components/_badge.scss +14 -38
- package/variables/components/_card.scss +1 -1
- package/variables/components/_chip.scss +50 -0
- package/variables/components/_datatable.scss +1 -1
- package/variables/components/_dropdowns.scss +1 -1
- package/variables/components/_form-check.scss +75 -1
- package/variables/components/_form-select.scss +20 -5
- package/variables/components/_form-validation.scss +14 -6
- package/variables/components/_index.scss +2 -0
- package/variables/components/_list-group.scss +1 -1
- package/variables/components/_notification.scss +5 -4
- package/variables/components/_pagination.scss +2 -2
- package/variables/components/_stepper.scss +25 -14
- package/variables/components/_subnavigation.scss +1 -1
- package/variables/components/_tag.scss +27 -0
- package/components/choice-control-card.scss +0 -148
- package/mixins/_badge.scss +0 -31
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
@forward './../variables/options';
|
|
2
|
+
|
|
3
|
+
@use './../variables/components/chip';
|
|
4
|
+
@use './../mixins/utilities';
|
|
5
|
+
@use './../mixins/chip' as chip-mx;
|
|
6
|
+
@use './../mixins/icons' as icons-mx;
|
|
7
|
+
@use './../placeholders/badge' as badge-ph;
|
|
8
|
+
|
|
9
|
+
.chip-dismissible {
|
|
10
|
+
@include chip-mx.chip-styles();
|
|
11
|
+
position: relative;
|
|
12
|
+
|
|
13
|
+
&::before,
|
|
14
|
+
&::after {
|
|
15
|
+
content: '';
|
|
16
|
+
display: inline-block;
|
|
17
|
+
flex: 0 0 auto;
|
|
18
|
+
height: chip.$chip-close-button-height;
|
|
19
|
+
width: chip.$chip-close-button-height;
|
|
20
|
+
transition: chip.$chip-transition;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&::before {
|
|
24
|
+
border-radius: chip.$chip-close-button-border-radius;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&:hover::before {
|
|
28
|
+
background-color: chip.$chip-hover-bg;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&::after {
|
|
32
|
+
@include icons-mx.icon(chip.$chip-close-button-icon);
|
|
33
|
+
position: absolute;
|
|
34
|
+
top: 50%;
|
|
35
|
+
left: chip.$chip-padding-x;
|
|
36
|
+
transform: translateY(-50%);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// set the focus ring on the close button only
|
|
40
|
+
@include utilities.focus-style-none();
|
|
41
|
+
@include utilities.focus-style('::before') {
|
|
42
|
+
background-color: chip.$chip-hover-bg;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@include utilities.disabled-style();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.chip-filter {
|
|
49
|
+
display: inline-block;
|
|
50
|
+
|
|
51
|
+
&-label {
|
|
52
|
+
@include chip-mx.chip-styles();
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
|
|
55
|
+
> .badge {
|
|
56
|
+
color: chip.$chip-hover-color;
|
|
57
|
+
background-color: chip.$chip-hover-bg;
|
|
58
|
+
border-color: transparent;
|
|
59
|
+
transition: chip.$chip-transition;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&-input {
|
|
64
|
+
@include utilities.visuallyhidden;
|
|
65
|
+
|
|
66
|
+
&:checked {
|
|
67
|
+
+ .chip-filter-label {
|
|
68
|
+
color: chip.$chip-active-color;
|
|
69
|
+
background-color: chip.$chip-active-bg;
|
|
70
|
+
border-color: transparent;
|
|
71
|
+
|
|
72
|
+
> .badge {
|
|
73
|
+
background-color: chip.$chip-bg;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@include utilities.high-contrast-mode() {
|
|
77
|
+
border-color: Highlight;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&:disabled + .chip-filter-label {
|
|
82
|
+
background-color: chip.$chip-disabled-active-bg;
|
|
83
|
+
|
|
84
|
+
@include utilities.high-contrast-mode() {
|
|
85
|
+
> .chip-text {
|
|
86
|
+
text-decoration: underline;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&:not(:disabled) {
|
|
92
|
+
+ .chip-filter-label > .chip-text {
|
|
93
|
+
text-decoration: underline;
|
|
94
|
+
transition: -webkit-text-decoration 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
95
|
+
transition: text-decoration 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
96
|
+
transition: text-decoration 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-text-decoration 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
+ .chip-filter-label:hover > .chip-text {
|
|
100
|
+
text-decoration-color: transparent;
|
|
101
|
+
|
|
102
|
+
@include utilities.high-contrast-mode() {
|
|
103
|
+
text-decoration-color: initial;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@include utilities.focus-style('+ .chip-filter-label') {
|
|
108
|
+
> .chip-text {
|
|
109
|
+
text-decoration-color: transparent;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&:not(:checked) + .chip-filter-label:hover {
|
|
116
|
+
color: chip.$chip-hover-color;
|
|
117
|
+
background-color: chip.$chip-hover-bg;
|
|
118
|
+
|
|
119
|
+
> .badge {
|
|
120
|
+
background-color: chip.$chip-bg;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@include utilities.disabled-style('+ .chip-filter-label') {
|
|
125
|
+
background-color: chip.$chip-disabled-bg;
|
|
126
|
+
|
|
127
|
+
@include utilities.high-contrast-mode() {
|
|
128
|
+
> .badge {
|
|
129
|
+
color: GrayText;
|
|
130
|
+
border-color: GrayText;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.chip-sm {
|
|
138
|
+
&.chip-dismissible {
|
|
139
|
+
@include chip-mx.chip-styles-sm();
|
|
140
|
+
|
|
141
|
+
&::before,
|
|
142
|
+
&::after {
|
|
143
|
+
height: chip.$chip-close-button-height-sm;
|
|
144
|
+
width: chip.$chip-close-button-height-sm;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&::after {
|
|
148
|
+
left: chip.$chip-padding-x-sm;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&.chip-filter > .chip-filter-label {
|
|
153
|
+
@include chip-mx.chip-styles-sm();
|
|
154
|
+
|
|
155
|
+
> .badge {
|
|
156
|
+
@extend %badge-sm;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
@use './../variables/components/datepicker';
|
|
6
6
|
@use './../variables/components/forms';
|
|
7
7
|
@use './../variables/commons';
|
|
8
|
+
@use './../variables/spacing';
|
|
8
9
|
@use './../mixins/icons' as icons-mx;
|
|
10
|
+
@use './../mixins/utilities';
|
|
9
11
|
|
|
10
12
|
@use './../themes/bootstrap/core' as b;
|
|
11
13
|
|
|
@@ -20,6 +22,10 @@ ngb-datepicker.dropdown-menu {
|
|
|
20
22
|
|
|
21
23
|
ngb-datepicker-navigation {
|
|
22
24
|
justify-content: space-between;
|
|
25
|
+
|
|
26
|
+
button.ngb-dp-arrow-btn {
|
|
27
|
+
@include utilities.focus-style();
|
|
28
|
+
}
|
|
23
29
|
}
|
|
24
30
|
|
|
25
31
|
ngb-datepicker-navigation-select.ngb-dp-navigation-select {
|
|
@@ -30,12 +36,6 @@ ngb-datepicker-navigation-select.ngb-dp-navigation-select {
|
|
|
30
36
|
border: 0;
|
|
31
37
|
background-position: right;
|
|
32
38
|
|
|
33
|
-
&:focus {
|
|
34
|
-
border-radius: commons.$border-radius;
|
|
35
|
-
background-color: transparent;
|
|
36
|
-
box-shadow: inset 0 0 0 commons.$border-thick color.$black;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
39
|
+ select {
|
|
40
40
|
margin-left: 0.5rem;
|
|
41
41
|
}
|
|
@@ -94,12 +94,20 @@ span.ngb-dp-navigation-chevron {
|
|
|
94
94
|
&.hidden {
|
|
95
95
|
flex-grow: 1;
|
|
96
96
|
}
|
|
97
|
-
}
|
|
98
97
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
@include utilities.focus-style() {
|
|
99
|
+
border-radius: commons.$border-radius;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
> [ngbDatepickerDayView] {
|
|
103
|
+
width: 40px !important;
|
|
104
|
+
height: 40px !important;
|
|
105
|
+
line-height: 40px;
|
|
106
|
+
|
|
107
|
+
&.active:not(.bg-primary) {
|
|
108
|
+
outline: none;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
103
111
|
}
|
|
104
112
|
|
|
105
113
|
.ngb-dp-day > .text-white {
|
|
@@ -112,7 +120,7 @@ span.ngb-dp-navigation-chevron {
|
|
|
112
120
|
}
|
|
113
121
|
|
|
114
122
|
.ngb-dp-day > .btn-light:hover {
|
|
115
|
-
background-color: color.$
|
|
123
|
+
background-color: color.$light;
|
|
116
124
|
}
|
|
117
125
|
|
|
118
126
|
.ngb-dp-day > .btn-light:not(:disabled):not(.disabled):active,
|
|
@@ -149,6 +157,10 @@ span.ngb-dp-navigation-chevron {
|
|
|
149
157
|
height: datepicker.$ngb-dp-icon-size;
|
|
150
158
|
transform: none;
|
|
151
159
|
}
|
|
160
|
+
|
|
161
|
+
@include utilities.focus-style() {
|
|
162
|
+
border-radius: commons.$border-radius;
|
|
163
|
+
}
|
|
152
164
|
}
|
|
153
165
|
|
|
154
166
|
.form-control-sm ~ .ngb-dp-open {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
@forward './../variables/options';
|
|
2
2
|
|
|
3
3
|
@use '../variables/color';
|
|
4
|
+
@use '../variables/commons';
|
|
4
5
|
@use '../variables/type';
|
|
5
6
|
@use '../variables/spacing';
|
|
6
7
|
@use '../variables/animation';
|
|
7
8
|
@use '../variables/components/form-check';
|
|
9
|
+
@use '../mixins/color' as color-mx;
|
|
8
10
|
@use '../mixins/icons' as icons-mx;
|
|
9
11
|
@use '../mixins/utilities' as utility-mx;
|
|
10
12
|
|
|
@@ -14,6 +16,10 @@
|
|
|
14
16
|
row-gap: form-check.$form-check-row-gap;
|
|
15
17
|
margin-bottom: form-check.$form-check-margin-bottom;
|
|
16
18
|
|
|
19
|
+
@include utility-mx.focus-style() {
|
|
20
|
+
border-radius: commons.$border-radius;
|
|
21
|
+
}
|
|
22
|
+
|
|
17
23
|
&-inline {
|
|
18
24
|
display: inline-flex;
|
|
19
25
|
}
|
|
@@ -27,31 +33,38 @@
|
|
|
27
33
|
color: rgba(var(--post-contrast-color-rgb), 0.8);
|
|
28
34
|
transition: color animation.$transition-base-timing;
|
|
29
35
|
|
|
30
|
-
|
|
31
|
-
|
|
36
|
+
@include utility-mx.high-contrast-mode {
|
|
37
|
+
transition: none;
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
&:hover:not([disabled]),
|
|
35
41
|
&:hover:not([disabled]) ~ &-label {
|
|
36
42
|
color: var(--post-contrast-color);
|
|
43
|
+
|
|
44
|
+
@include utility-mx.high-contrast-mode() {
|
|
45
|
+
border-color: Highlight;
|
|
46
|
+
}
|
|
37
47
|
}
|
|
38
48
|
}
|
|
39
49
|
|
|
40
50
|
&-input {
|
|
51
|
+
&:not([disabled]),
|
|
52
|
+
&:not([disabled]) ~ .form-check-label {
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@include utility-mx.focus-style-none();
|
|
57
|
+
|
|
41
58
|
display: inline-flex;
|
|
42
59
|
flex: 0 auto;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
background: none;
|
|
60
|
+
appearance: none;
|
|
61
|
+
background: transparent;
|
|
46
62
|
height: form-check.$form-check-input-size;
|
|
47
63
|
width: form-check.$form-check-input-size;
|
|
48
|
-
border: form-check.$form-check-input-border-width solid
|
|
49
|
-
rgba(var(--post-contrast-color-rgb), 0.8);
|
|
64
|
+
border: form-check.$form-check-input-border-width solid currentColor;
|
|
50
65
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
border-color: currentColor;
|
|
54
|
-
box-shadow: form-check.$form-check-input-focus-box-shadow;
|
|
66
|
+
@include utility-mx.high-contrast-mode {
|
|
67
|
+
border-color: FieldText; // For blink-browser as otherwise the default color (which is not a full color) will be converted to Highlight
|
|
55
68
|
}
|
|
56
69
|
|
|
57
70
|
&::after {
|
|
@@ -60,16 +73,6 @@
|
|
|
60
73
|
flex: 1;
|
|
61
74
|
}
|
|
62
75
|
|
|
63
|
-
&:checked,
|
|
64
|
-
&:indeterminate {
|
|
65
|
-
color: var(--post-contrast-color);
|
|
66
|
-
border-color: var(--post-contrast-color);
|
|
67
|
-
|
|
68
|
-
~ .form-check-label {
|
|
69
|
-
color: var(--post-contrast-color);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
76
|
&[type='checkbox'] {
|
|
74
77
|
&:checked::after {
|
|
75
78
|
@include icons-mx.icon(3035);
|
|
@@ -78,6 +81,14 @@
|
|
|
78
81
|
&:indeterminate::after {
|
|
79
82
|
@include icons-mx.icon(2039);
|
|
80
83
|
}
|
|
84
|
+
|
|
85
|
+
&:checked,
|
|
86
|
+
&:indeterminate {
|
|
87
|
+
@include utility-mx.high-contrast-mode {
|
|
88
|
+
background-color: SelectedItem !important;
|
|
89
|
+
color: SelectedItemText !important; // Important is needed for card-control
|
|
90
|
+
}
|
|
91
|
+
}
|
|
81
92
|
}
|
|
82
93
|
|
|
83
94
|
&[type='radio'] {
|
|
@@ -88,13 +99,85 @@
|
|
|
88
99
|
background-color: currentColor;
|
|
89
100
|
border-radius: inherit;
|
|
90
101
|
background-clip: padding-box;
|
|
102
|
+
|
|
103
|
+
@include utility-mx.high-contrast-mode {
|
|
104
|
+
background-color: SelectedItem;
|
|
105
|
+
border-color: Canvas;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&[disabled] {
|
|
110
|
+
padding: spacing.$size-line; // Used to mimic border width because it is used in combination with background-clip: padding-box; to size the selected shape
|
|
111
|
+
background-image: url('#{form-check.$form-check-input-radio-disabled-background-url-light}');
|
|
112
|
+
|
|
113
|
+
@include color-mx.on-dark-background {
|
|
114
|
+
background-image: url('#{form-check.$form-check-input-radio-disabled-background-url-dark}');
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@include utility-mx.high-contrast-mode {
|
|
118
|
+
background-image: url('#{form-check.$form-check-input-radio-disabled-background-url-hcm}') !important;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&[disabled] {
|
|
124
|
+
&[type='checkbox'],
|
|
125
|
+
&[type='radio'] {
|
|
126
|
+
@include utility-mx.high-contrast-mode {
|
|
127
|
+
border-color: GrayText !important;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&[type='checkbox'] {
|
|
132
|
+
&:checked,
|
|
133
|
+
&:indeterminate {
|
|
134
|
+
@include utility-mx.high-contrast-mode {
|
|
135
|
+
background-color: Field !important;
|
|
136
|
+
color: GrayText !important;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&[type='radio'] {
|
|
142
|
+
&:checked::after {
|
|
143
|
+
@include utility-mx.high-contrast-mode {
|
|
144
|
+
background-color: GrayText;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
border: 0;
|
|
150
|
+
background-image: url('#{form-check.$form-check-input-disabled-background-url-light-lg}');
|
|
151
|
+
|
|
152
|
+
@include color-mx.on-dark-background {
|
|
153
|
+
background-image: url('#{form-check.$form-check-input-disabled-background-url-dark-lg}');
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
@include utility-mx.high-contrast-mode {
|
|
157
|
+
background-image: url('#{form-check.$form-check-input-disabled-background-url-hcm-lg}') !important;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.form-check-sm &[type='checkbox'] {
|
|
161
|
+
background-image: url('#{form-check.$form-check-input-disabled-background-url-light-sm}');
|
|
162
|
+
|
|
163
|
+
@include color-mx.on-dark-background {
|
|
164
|
+
background-image: url('#{form-check.$form-check-input-disabled-background-url-dark-sm}');
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@include utility-mx.high-contrast-mode {
|
|
168
|
+
background-image: url('#{form-check.$form-check-input-disabled-background-url-hcm-sm}') !important;
|
|
169
|
+
}
|
|
91
170
|
}
|
|
92
171
|
}
|
|
93
172
|
|
|
94
173
|
&[disabled],
|
|
95
174
|
&[disabled] ~ .form-check-label {
|
|
96
|
-
|
|
97
|
-
color:
|
|
175
|
+
text-decoration: line-through;
|
|
176
|
+
color: color.$black-alpha-60;
|
|
177
|
+
|
|
178
|
+
@include color-mx.on-dark-background() {
|
|
179
|
+
color: color.$white-alpha-80;
|
|
180
|
+
}
|
|
98
181
|
}
|
|
99
182
|
|
|
100
183
|
.form-check-sm & {
|
|
@@ -159,13 +242,13 @@
|
|
|
159
242
|
border: form-check.$form-check-input-border-width solid CanvasText;
|
|
160
243
|
|
|
161
244
|
&:checked {
|
|
162
|
-
background-color: SelectedItem;
|
|
245
|
+
background-color: SelectedItem !important;
|
|
163
246
|
}
|
|
164
247
|
|
|
165
248
|
&::after,
|
|
166
249
|
&:checked::after {
|
|
167
250
|
max-width: calc(
|
|
168
|
-
|
|
251
|
+
form-check.$form-switch-height - (form-check.$form-check-input-border-width * 2)
|
|
169
252
|
);
|
|
170
253
|
border-color: Canvas;
|
|
171
254
|
background-color: CanvasText;
|
|
@@ -178,6 +261,16 @@
|
|
|
178
261
|
&::after {
|
|
179
262
|
border-color: form-check.$form-switch-disabled-border-color;
|
|
180
263
|
}
|
|
264
|
+
|
|
265
|
+
@include utility-mx.high-contrast-mode {
|
|
266
|
+
&::after {
|
|
267
|
+
border-color: Field;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
&:checked {
|
|
271
|
+
background-color: GrayText !important;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
181
274
|
}
|
|
182
275
|
}
|
|
183
276
|
|
|
@@ -186,12 +279,6 @@
|
|
|
186
279
|
|
|
187
280
|
@include utility-mx.high-contrast-mode {
|
|
188
281
|
border-color: Highlight;
|
|
189
|
-
|
|
190
|
-
&:checked,
|
|
191
|
-
&::after,
|
|
192
|
-
&:checked::after {
|
|
193
|
-
background-color: Highlight;
|
|
194
|
-
}
|
|
195
282
|
}
|
|
196
283
|
}
|
|
197
284
|
|
|
@@ -10,11 +10,28 @@
|
|
|
10
10
|
@use './../variables/components/forms';
|
|
11
11
|
@use './../mixins/utilities';
|
|
12
12
|
|
|
13
|
+
$track-height: 4px;
|
|
14
|
+
$webkit-progress-height-adjustment: 2px;
|
|
15
|
+
$webkit-thumb-width: 32px;
|
|
16
|
+
|
|
17
|
+
.form-range-wrapper {
|
|
18
|
+
@include utilities.focus-style() {
|
|
19
|
+
border-radius: commons.$border-radius;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:not(.form-range-wrapper) > {
|
|
24
|
+
.form-range {
|
|
25
|
+
@include utilities.focus-style() {
|
|
26
|
+
border-radius: commons.$border-radius;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
13
31
|
.form-range {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
--post-sx: calc(0.5 * 1.5em + var(--post-ratio) * (100% - 1.5em));
|
|
32
|
+
&::-webkit-slider-container {
|
|
33
|
+
overflow-x: clip;
|
|
34
|
+
}
|
|
18
35
|
|
|
19
36
|
&::-moz-range-thumb {
|
|
20
37
|
border-radius: 50%;
|
|
@@ -22,26 +39,78 @@
|
|
|
22
39
|
cursor: pointer;
|
|
23
40
|
}
|
|
24
41
|
|
|
42
|
+
&::-webkit-slider-runnable-track {
|
|
43
|
+
height: $track-height;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&::-webkit-slider-thumb {
|
|
47
|
+
// Source: https://antvil.github.io/css-sos/sos/progress/
|
|
48
|
+
clip-path: polygon(
|
|
49
|
+
0 calc(50% - $track-height * 0.5),
|
|
50
|
+
1px calc(50% - #{$track-height * 0.5 + 4px}),
|
|
51
|
+
1px 0,
|
|
52
|
+
$webkit-thumb-width 0,
|
|
53
|
+
$webkit-thumb-width $webkit-thumb-width,
|
|
54
|
+
1px $webkit-thumb-width,
|
|
55
|
+
1px calc(50% + #{$track-height * 0.5 + 4px}),
|
|
56
|
+
0 calc(50% + #{$track-height * 0.5}),
|
|
57
|
+
-100vw calc(50% + #{$track-height * 0.5}),
|
|
58
|
+
-100vw calc(50% - #{$track-height * 0.5})
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&::-moz-range-track,
|
|
63
|
+
&::-moz-range-progress {
|
|
64
|
+
height: $track-height;
|
|
65
|
+
}
|
|
66
|
+
|
|
25
67
|
&:not(:disabled, .disabled) {
|
|
26
68
|
&::-webkit-slider-runnable-track {
|
|
27
|
-
background: linear-gradient(color.$black, color.$black) 0 / var(--post-sx) 100%;
|
|
28
|
-
background-repeat: no-repeat;
|
|
29
69
|
background-color: color.$gray-20;
|
|
30
70
|
}
|
|
31
71
|
|
|
32
72
|
&::-moz-range-progress {
|
|
33
73
|
background-color: color.$black;
|
|
34
74
|
}
|
|
75
|
+
|
|
76
|
+
&::-webkit-slider-thumb {
|
|
77
|
+
box-shadow: calc(-100vw - $webkit-thumb-width) 0 0 100vw color.$black;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&:hover {
|
|
81
|
+
&::-webkit-slider-thumb {
|
|
82
|
+
border-width: 3px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&::-moz-range-thumb {
|
|
86
|
+
border-width: 3px;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&:focus::-moz-range-thumb {
|
|
91
|
+
box-shadow: none; // Remove default style
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@include utilities.focus-style-custom('::-moz-range-thumb') {
|
|
95
|
+
outline: none;
|
|
96
|
+
}
|
|
35
97
|
}
|
|
36
98
|
|
|
37
99
|
&:disabled,
|
|
38
100
|
&.disabled {
|
|
39
101
|
&::-webkit-slider-thumb {
|
|
40
102
|
border-color: forms.$form-range-thumb-disabled-border-color;
|
|
103
|
+
border-style: dashed;
|
|
104
|
+
box-shadow: calc(-100vw - $webkit-thumb-width) 0 0 100vw color.$gray-40;
|
|
41
105
|
}
|
|
42
106
|
|
|
43
107
|
&::-moz-range-thumb {
|
|
44
108
|
border-color: forms.$form-range-thumb-disabled-border-color;
|
|
109
|
+
border-style: dashed;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&::-moz-range-progress {
|
|
113
|
+
background-color: color.$gray-40;
|
|
45
114
|
}
|
|
46
115
|
}
|
|
47
116
|
|
|
@@ -57,10 +126,16 @@
|
|
|
57
126
|
// so, the "forced-color-adjust" property is necessary for "linear-gradient" to continue to work
|
|
58
127
|
forced-color-adjust: none;
|
|
59
128
|
|
|
129
|
+
&::-webkit-slider-thumb {
|
|
130
|
+
box-shadow: calc(-100vw - $webkit-thumb-width) 0 0 100vw SelectedItem !important;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&::-moz-range-progress {
|
|
134
|
+
background-color: SelectedItem !important;
|
|
135
|
+
}
|
|
136
|
+
|
|
60
137
|
&:not(:disabled, .disabled) {
|
|
61
138
|
&::-webkit-slider-runnable-track {
|
|
62
|
-
background: linear-gradient(Highlight, Highlight) 0 / var(--post-sx) 100%;
|
|
63
|
-
background-repeat: no-repeat;
|
|
64
139
|
background-color: ButtonBorder;
|
|
65
140
|
}
|
|
66
141
|
|
|
@@ -73,38 +148,38 @@
|
|
|
73
148
|
background-color: ButtonText;
|
|
74
149
|
}
|
|
75
150
|
|
|
76
|
-
&::-moz-range-progress {
|
|
77
|
-
background-color: Highlight;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
151
|
&::-moz-range-thumb {
|
|
81
152
|
background-color: ButtonFace;
|
|
82
153
|
border-color: ButtonText;
|
|
83
154
|
}
|
|
84
155
|
|
|
85
|
-
&:
|
|
156
|
+
&:hover {
|
|
86
157
|
&::-webkit-slider-thumb {
|
|
87
|
-
|
|
88
|
-
outline: commons.$border-thick solid Highlight;
|
|
158
|
+
border-color: Highlight;
|
|
89
159
|
}
|
|
90
160
|
|
|
91
161
|
&::-moz-range-thumb {
|
|
92
|
-
|
|
93
|
-
outline: commons.$border-thick solid Highlight;
|
|
162
|
+
border-color: Highlight;
|
|
94
163
|
}
|
|
95
164
|
}
|
|
96
165
|
}
|
|
97
166
|
|
|
98
167
|
&:disabled,
|
|
99
168
|
&.disabled {
|
|
169
|
+
&::-moz-range-progress {
|
|
170
|
+
background-color: GrayText !important;
|
|
171
|
+
}
|
|
172
|
+
|
|
100
173
|
&::-webkit-slider-thumb {
|
|
101
174
|
background-color: ButtonFace;
|
|
102
|
-
border-color:
|
|
175
|
+
border-color: GrayText;
|
|
176
|
+
|
|
177
|
+
box-shadow: calc(-100vw - $webkit-thumb-width) 0 0 100vw GrayText !important;
|
|
103
178
|
}
|
|
104
179
|
|
|
105
180
|
&::-moz-range-thumb {
|
|
106
181
|
background-color: ButtonFace;
|
|
107
|
-
border-color:
|
|
182
|
+
border-color: GrayText;
|
|
108
183
|
}
|
|
109
184
|
}
|
|
110
185
|
}
|