@@ -38,7 +38,7 @@ export class UUIToggleElement extends UUIBooleanInputElement {
38
38
39
39
renderCheckbox ( ) {
40
40
return html `
41
- <div id= "slider " >
41
+ <div id= "toggle " >
42
42
<div id= "icon-checked" > ${ iconCheck } </ div>
43
43
<div id= "icon-unchecked" > ${ iconRemove } </ div>
44
44
</ div>
@@ -54,7 +54,7 @@ export class UUIToggleElement extends UUIBooleanInputElement {
54
54
--uui-toggle-switch-width : calc (2 * var (--uui-toggle-size ));
55
55
}
56
56
57
- # slider {
57
+ # toggle {
58
58
position : relative;
59
59
grid-area : 'input' ;
60
60
display : flex;
@@ -75,7 +75,7 @@ export class UUIToggleElement extends UUIBooleanInputElement {
75
75
font-size : calc (var (--uui-toggle-size ) * 0.6 );
76
76
}
77
77
78
- label : hover input : not ([disabled ]) ~ # slider {
78
+ label : hover input : not ([disabled ]) ~ # toggle {
79
79
border-color : var (
80
80
--uui-toggle-border-color-hover ,
81
81
var (--uui-color-border-emphasis )
@@ -86,7 +86,7 @@ export class UUIToggleElement extends UUIBooleanInputElement {
86
86
);
87
87
}
88
88
89
- label : focus # slider {
89
+ label : focus # toggle {
90
90
border-color : var (
91
91
--uui-toggle-border-color-focus ,
92
92
var (--uui-color-focus )
@@ -97,15 +97,15 @@ export class UUIToggleElement extends UUIBooleanInputElement {
97
97
);
98
98
}
99
99
100
- input : checked ~ # slider {
100
+ input : checked ~ # toggle {
101
101
background-color : var (--uui-color-selected );
102
102
}
103
103
104
- label : hover input : checked : not ([disabled ]) ~ # slider {
104
+ label : hover input : checked : not ([disabled ]) ~ # toggle {
105
105
background-color : var (--uui-color-selected-emphasis );
106
106
}
107
107
108
- label : focus input : checked ~ # slider {
108
+ label : focus input : checked ~ # toggle {
109
109
background-color : var (--uui-color-selected-emphasis );
110
110
}
111
111
@@ -131,11 +131,11 @@ export class UUIToggleElement extends UUIBooleanInputElement {
131
131
color : var (--uui-color-interactive );
132
132
}
133
133
134
- input : checked ~ # slider # icon-checked {
134
+ input : checked ~ # toggle # icon-checked {
135
135
color : var (--uui-color-selected-contrast );
136
136
}
137
137
138
- # slider ::after {
138
+ # toggle ::after {
139
139
content : '' ;
140
140
position : absolute;
141
141
top : 2px ;
@@ -151,45 +151,45 @@ export class UUIToggleElement extends UUIBooleanInputElement {
151
151
background-color 120ms ;
152
152
}
153
153
154
- input : checked ~ # slider ::after {
154
+ input : checked ~ # toggle ::after {
155
155
left : calc (100% - 2px );
156
156
transform : translateX (-100% );
157
157
}
158
158
159
- input : focus ~ # slider {
159
+ input : focus ~ # toggle {
160
160
outline : calc (2px * var (--uui-show-focus-outline , 1 )) solid
161
161
var (--uui-color-focus );
162
162
}
163
163
164
- : host (: not ([disabled ], [readonly ])) label : active # slider ::after {
164
+ : host (: not ([disabled ], [readonly ])) label : active # toggle ::after {
165
165
/** Stretch when mouse down */
166
166
width : calc (1.06 * var (--uui-toggle-size ));
167
167
}
168
168
169
- : host ([disabled ]) # slider {
169
+ : host ([disabled ]) # toggle {
170
170
background-color : var (--uui-color-disabled-standalone );
171
171
}
172
- : host ([disabled ]) input : checked ~ # slider {
172
+ : host ([disabled ]) input : checked ~ # toggle {
173
173
background-color : var (--uui-color-disabled-contrast );
174
174
}
175
- : host ([disabled ]) # slider ::after {
175
+ : host ([disabled ]) # toggle ::after {
176
176
background-color : var (--uui-color-disabled );
177
177
}
178
- : host ([disabled ]) # slider # icon-unchecked {
178
+ : host ([disabled ]) # toggle # icon-unchecked {
179
179
color : var (--uui-color-disabled-contrast );
180
180
}
181
- : host ([disabled ]) label : active # slider {
181
+ : host ([disabled ]) label : active # toggle {
182
182
animation : ${ UUIHorizontalShakeAnimationValue } ;
183
183
}
184
- : host ([disabled ]) input : checked # slider # icon-checked {
184
+ : host ([disabled ]) input : checked # toggle # icon-checked {
185
185
color : var (--uui-color-disabled-contrast );
186
186
}
187
187
188
- : host (: not ([pristine ]): invalid ) # slider ,
189
- : host (: not ([pristine ]): invalid ) label : hover # slider ,
188
+ : host (: not ([pristine ]): invalid ) # toggle ,
189
+ : host (: not ([pristine ]): invalid ) label : hover # toggle ,
190
190
/* polyfill support */
191
- : host (: not ([pristine ])[internals-invalid ]) # slider ,
192
- : host (: not ([pristine ])[internals-invalid ]) label : hover # slider {
191
+ : host (: not ([pristine ])[internals-invalid ]) # toggle ,
192
+ : host (: not ([pristine ])[internals-invalid ]) label : hover # toggle {
193
193
border : 1px solid var (--uui-color-danger-standalone );
194
194
}
195
195
` ,
0 commit comments