@@ -72,7 +72,7 @@ span[data-sap-ui-wc-root] {
72
72
width : 100% ;
73
73
}
74
74
75
- .ui5-switch {
75
+ .ui5-switch-wrapper {
76
76
position : relative ;
77
77
width : 100% ;
78
78
height : @_ui5_switch_height ;
@@ -154,7 +154,7 @@ span[data-sap-ui-wc-root] {
154
154
}
155
155
156
156
// switch focused
157
- .sap-desktop .ui5-switch :focus ::after {
157
+ .sap-desktop .ui5-switch-wrapper :focus ::after {
158
158
content : " " ;
159
159
position : absolute ;
160
160
left : - @_ui5_switch_outline ;
@@ -166,7 +166,7 @@ span[data-sap-ui-wc-root] {
166
166
}
167
167
168
168
// switch hidden input
169
- .ui5-switch .ui5-switch-input {
169
+ .ui5-switch-wrapper .ui5-switch-input {
170
170
position : absolute ;
171
171
left : 0 ;
172
172
width : 0 ;
@@ -177,177 +177,177 @@ span[data-sap-ui-wc-root] {
177
177
}
178
178
179
179
// switch disabled
180
- .ui5-switch.ui5-switch--disabled {
180
+ .ui5-switch-wrapper .ui5-switch--disabled {
181
181
opacity : 0.4 ;
182
182
cursor : default ;
183
183
}
184
184
185
- .ui5-switch.ui5-switch--disabled .ui5-switch-track {
185
+ .ui5-switch-wrapper .ui5-switch--disabled .ui5-switch-track {
186
186
background : @_ui5_switch_track_disabled_bg ;
187
187
border-color : @_ui5_switch_track_disabled_border_color ;
188
188
}
189
189
190
- .ui5-switch.ui5-switch--disabled.ui5-switch--checked .ui5-switch-track {
190
+ .ui5-switch-wrapper .ui5-switch--disabled.ui5-switch--checked .ui5-switch-track {
191
191
background : @_ui5_switch_track_disabled_checked_bg ;
192
192
}
193
- .ui5-switch.ui5-switch--disabled.ui5-switch--checked .ui5-switch-handle {
193
+ .ui5-switch-wrapper .ui5-switch--disabled.ui5-switch--checked .ui5-switch-handle {
194
194
background : @_ui5_switch_handle_disabled_checked_bg ;
195
195
}
196
196
197
197
198
- .ui5-switch.ui5-switch--disabled .ui5-switch-handle {
198
+ .ui5-switch-wrapper .ui5-switch--disabled .ui5-switch-handle {
199
199
background : @_ui5_switch_handle_disabled_bg ;
200
200
border-color : @_ui5_switch_handle_disabled_border_color ;
201
201
}
202
202
203
- .ui5-switch.ui5-switch--semantic.ui5-switch--disabled .ui5-switch-track {
203
+ .ui5-switch-wrapper .ui5-switch--semantic.ui5-switch--disabled .ui5-switch-track {
204
204
background : @_ui5_switch_track_disabled_semantic_checked_bg ;
205
205
border-color : @_ui5_switch_track_disabled_semantic_checked_border_color ;
206
206
}
207
207
208
- .ui5-switch.ui5-switch--semantic.ui5-switch--disabled .ui5-switch-handle {
208
+ .ui5-switch-wrapper .ui5-switch--semantic.ui5-switch--disabled .ui5-switch-handle {
209
209
background : @_ui5_switch_handle_disabled_semantic_checked_bg ;
210
210
border-color : @_ui5_switch_handle_disabled_semantic_checked_border_color ;
211
211
}
212
212
213
- .ui5-switch.ui5-switch--semantic.ui5-switch--disabled :not (.ui5-switch--checked ) .ui5-switch-track {
213
+ .ui5-switch-wrapper .ui5-switch--semantic.ui5-switch--disabled :not (.ui5-switch--checked ) .ui5-switch-track {
214
214
background : @_ui5_switch_track_disabled_semantic_bg ;
215
215
border-color : @_ui5_switch_track_disabled_semantic_border_color ;
216
216
}
217
217
218
- .ui5-switch.ui5-switch--semantic.ui5-switch--disabled :not (.ui5-switch--checked ) .ui5-switch-handle {
218
+ .ui5-switch-wrapper .ui5-switch--semantic.ui5-switch--disabled :not (.ui5-switch--checked ) .ui5-switch-handle {
219
219
background : @_ui5_switch_handle_disabled_semantic_bg ;
220
220
border-color : @_ui5_switch_handle_disabled_semantic_border_color ;
221
221
}
222
222
223
- .ui5-switch.ui5-switch--disabled.ui5-switch--checked .ui5-switch-text {
223
+ .ui5-switch-wrapper .ui5-switch--disabled.ui5-switch--checked .ui5-switch-text {
224
224
color : @_ui5_switch_text_disabled_color ;
225
225
}
226
226
227
227
228
228
// switch checked
229
- .ui5-switch.ui5-switch--checked .ui5-switch-handle {
229
+ .ui5-switch-wrapper .ui5-switch--checked .ui5-switch-handle {
230
230
background : @_ui5_switch_handle_checked_bg ;
231
231
border-color : @_ui5_switch_handle_checked_border_color ;
232
232
}
233
233
234
- .ui5-switch.ui5-switch--checked .ui5-switch-track {
234
+ .ui5-switch-wrapper .ui5-switch--checked .ui5-switch-track {
235
235
background : @_ui5_switch_track_checked_bg ;
236
236
border-color : @_ui5_switch_track_checked_border_color ;
237
237
}
238
238
239
- .ui5-switch.ui5-switch--checked .ui5-switch-slider {
239
+ .ui5-switch-wrapper .ui5-switch--checked .ui5-switch-slider {
240
240
// Move slider to oposite end, taking into account the handle as an offset.
241
241
// Note: translate(calc()) does not work in IE11
242
242
transform : translateX (100% ) translateX (-1.875rem );
243
243
}
244
244
245
245
// switch semantic off
246
- .ui5-switch.ui5-switch--semantic .ui5-switch-track ,
247
- .ui5-switch.ui5-switch--semantic .ui5-switch-handle {
246
+ .ui5-switch-wrapper .ui5-switch--semantic .ui5-switch-track ,
247
+ .ui5-switch-wrapper .ui5-switch--semantic .ui5-switch-handle {
248
248
border-color : @sapUiSuccessBorder ;
249
249
}
250
250
251
- .ui5-switch.ui5-switch--semantic .ui5-switch-track {
251
+ .ui5-switch-wrapper .ui5-switch--semantic .ui5-switch-track {
252
252
background : @sapUiSuccessBG ;
253
253
}
254
254
255
- .ui5-switch.ui5-switch--semantic .ui5-switch-handle {
255
+ .ui5-switch-wrapper .ui5-switch--semantic .ui5-switch-handle {
256
256
background : lighten (@sapUiSuccessBG , 5 );
257
257
}
258
258
259
259
// switch semantic icon
260
- .ui5-switch.ui5-switch--semantic .ui5-switch-text {
260
+ .ui5-switch-wrapper .ui5-switch--semantic .ui5-switch-text {
261
261
justify-content : center ;
262
262
font-size : @sapMFontSmallSize ;
263
263
}
264
264
265
- .ui5-switch.ui5-switch--semantic .ui5-switch-text ::before {
265
+ .ui5-switch-wrapper .ui5-switch--semantic .ui5-switch-text ::before {
266
266
font-family : ' SAP-icons' ;
267
267
speak : none ;
268
268
width : 0.75rem ;
269
269
height : 0.75rem ;
270
270
line-height : 0.75rem ;
271
271
}
272
- .ui5-switch.ui5-switch--semantic .ui5-switch-text--on ::before {
272
+ .ui5-switch-wrapper .ui5-switch--semantic .ui5-switch-text--on ::before {
273
273
content : " \e05b " ;
274
274
color : @sapUiPositiveElement ;
275
275
}
276
276
277
- .ui5-switch.ui5-switch--semantic .ui5-switch-text--off ::before {
277
+ .ui5-switch-wrapper .ui5-switch--semantic .ui5-switch-text--off ::before {
278
278
content : " \e03e " ;
279
279
color : @sapUiNegativeElement ;
280
280
}
281
281
282
282
// switch semantic on
283
- .ui5-switch.ui5-switch--semantic :not (.ui5-switch--checked ) .ui5-switch-track ,
284
- .ui5-switch.ui5-switch--semantic :not (.ui5-switch--checked ) .ui5-switch-handle {
283
+ .ui5-switch-wrapper .ui5-switch--semantic :not (.ui5-switch--checked ) .ui5-switch-track ,
284
+ .ui5-switch-wrapper .ui5-switch--semantic :not (.ui5-switch--checked ) .ui5-switch-handle {
285
285
border-color : @sapUiErrorBorder ;
286
286
}
287
287
288
- .ui5-switch.ui5-switch--semantic :not (.ui5-switch--checked ) .ui5-switch-track {
288
+ .ui5-switch-wrapper .ui5-switch--semantic :not (.ui5-switch--checked ) .ui5-switch-track {
289
289
background : @sapUiErrorBG ;
290
290
}
291
291
292
- .ui5-switch.ui5-switch--semantic :not (.ui5-switch--checked ) .ui5-switch-handle {
292
+ .ui5-switch-wrapper .ui5-switch--semantic :not (.ui5-switch--checked ) .ui5-switch-handle {
293
293
background : lighten (@sapUiErrorBG ,4 );
294
294
}
295
295
296
296
// switch hover effects
297
297
298
298
// switch on hover, when switched off
299
- .sap-desktop .ui5-switch :not (.ui5-switch--disabled ):hover .ui5-switch-track {
299
+ .sap-desktop .ui5-switch-wrapper :not (.ui5-switch--disabled ):hover .ui5-switch-track {
300
300
border-color : @sapUiContentForegroundBorderColor ;
301
301
}
302
302
303
- .sap-desktop .ui5-switch :not (.ui5-switch--disabled ):hover .ui5-switch-handle {
303
+ .sap-desktop .ui5-switch-wrapper :not (.ui5-switch--disabled ):hover .ui5-switch-handle {
304
304
background : @_ui5_switch_handle_hover_bg ;
305
305
border-color : @sapUiContentForegroundBorderColor ;
306
306
}
307
307
308
308
// switch on hover, when switched on
309
- .sap-desktop .ui5-switch.ui5-switch--checked :not (.ui5-switch--disabled ):hover .ui5-switch-handle {
309
+ .sap-desktop .ui5-switch-wrapper .ui5-switch--checked :not (.ui5-switch--disabled ):hover .ui5-switch-handle {
310
310
background : @sapUiToggleButtonPressedHoverBackground ;
311
311
border-color : @sapUiToggleButtonPressedHoverBorderColor ;
312
312
}
313
313
314
- .sap-desktop .ui5-switch.ui5-switch--checked :not (.ui5-switch--disabled ):hover .ui5-switch-track {
314
+ .sap-desktop .ui5-switch-wrapper .ui5-switch--checked :not (.ui5-switch--disabled ):hover .ui5-switch-track {
315
315
border-color : @_ui5_switch_track_hover_border_color ;
316
316
}
317
317
318
318
// semantic switch on hover, when switched off
319
- .sap-desktop .ui5-switch.ui5-switch--semantic :not (.ui5-switch--disabled ):hover .ui5-switch-handle {
319
+ .sap-desktop .ui5-switch-wrapper .ui5-switch--semantic :not (.ui5-switch--disabled ):hover .ui5-switch-handle {
320
320
background : @_ui5_switch_handle_semantic_hover_bg ;
321
321
border-color : @_ui5_switch_handle_semantic_hover_border_color ;
322
322
}
323
323
324
- .sap-desktop .ui5-switch.ui5-switch--semantic :not (.ui5-switch--disabled ):hover .ui5-switch-track {
324
+ .sap-desktop .ui5-switch-wrapper .ui5-switch--semantic :not (.ui5-switch--disabled ):hover .ui5-switch-track {
325
325
border-color : @_ui5_switch_handle_semantic_hover_border_color ;
326
326
}
327
327
328
328
// semantic switch on hover, when switched on
329
- .sap-desktop .ui5-switch.ui5-switch--semantic.ui5-switch--checked :not (.ui5-switch--disabled ):hover .ui5-switch-handle {
329
+ .sap-desktop .ui5-switch-wrapper .ui5-switch--semantic.ui5-switch--checked :not (.ui5-switch--disabled ):hover .ui5-switch-handle {
330
330
background : @_ui5_switch_handle_semantic_checked_hover_bg ;
331
331
border-color : @_ui5_switch_handle_semantic_checked_hover_border_color ;
332
332
}
333
333
334
- .sap-desktop .ui5-switch.ui5-switch--semantic.ui5-switch--checked :not (.ui5-switch--disabled ):hover .ui5-switch-track {
334
+ .sap-desktop .ui5-switch-wrapper .ui5-switch--semantic.ui5-switch--checked :not (.ui5-switch--disabled ):hover .ui5-switch-track {
335
335
border-color : @_ui5_switch_handle_semantic_checked_hover_border_color ;
336
336
}
337
337
338
- .ui5-switch.ui5-switch--semantic.ui5-switch--disabled .ui5-switch-text--on ::before ,
339
- .ui5-switch.ui5-switch--semantic :hover .ui5-switch-text--on ::before {
338
+ .ui5-switch-wrapper .ui5-switch--semantic.ui5-switch--disabled .ui5-switch-text--on ::before ,
339
+ .ui5-switch-wrapper .ui5-switch--semantic :hover .ui5-switch-text--on ::before {
340
340
color : @_ui5_switch_text_on_semantic_color ;
341
341
}
342
342
343
- .ui5-switch.ui5-switch--semantic.ui5-switch--disabled .ui5-switch-text--off ::before ,
344
- .ui5-switch.ui5-switch--semantic :hover .ui5-switch-text--off ::before {
343
+ .ui5-switch-wrapper .ui5-switch--semantic.ui5-switch--disabled .ui5-switch-text--off ::before ,
344
+ .ui5-switch-wrapper .ui5-switch--semantic :hover .ui5-switch-text--off ::before {
345
345
color : @_ui5_switch_text_off_semantic_color ;
346
346
}
347
347
348
348
/* Compact size */
349
349
.sapUiSizeCompact {
350
- .ui5-switch {
350
+ .ui5-switch-wrapper {
351
351
height : @_ui5_switch_compact_height ;
352
352
min-width : @_ui5_switch_compact_width ;
353
353
@@ -370,34 +370,34 @@ span[data-sap-ui-wc-root] {
370
370
371
371
/* RTL */
372
372
[dir= " rtl" ] {
373
- .ui5-switch .ui5-switch-handle {
373
+ .ui5-switch-wrapper .ui5-switch-handle {
374
374
left : 0 ;
375
375
right : -1px ;
376
376
}
377
377
378
- .ui5-switch.ui5-switch--checked .ui5-switch-slider {
378
+ .ui5-switch-wrapper .ui5-switch--checked .ui5-switch-slider {
379
379
transform : translateX (1.875rem ) translateX (-100% );
380
380
}
381
381
382
- .ui5-switch .ui5-switch-text--on {
382
+ .ui5-switch-wrapper .ui5-switch-text--on {
383
383
right : calc (~ " -100% + 1.9125rem" );
384
384
left : auto ;
385
385
}
386
386
387
- .ui5-switch .ui5-switch-text--off {
387
+ .ui5-switch-wrapper .ui5-switch-text--off {
388
388
right : auto ;
389
389
left : 0 ;
390
390
}
391
391
}
392
392
393
393
/* RTL + Compact */
394
394
.sapUiSizeCompact [dir= " rtl" ] {
395
- .ui5-switch.ui5-switch--checked .ui5-switch-slider {
395
+ .ui5-switch-wrapper .ui5-switch--checked .ui5-switch-slider {
396
396
transform : translateX (-100% ) translateX (1.5rem );
397
397
398
398
}
399
399
400
- .ui5-switch .ui5-switch-text--on {
400
+ .ui5-switch-wrapper .ui5-switch-text--on {
401
401
right : calc (~ " -100% + 1.5625rem" );
402
402
}
403
403
}
0 commit comments