Skip to content

Commit c6c146c

Browse files
authored
refactor(switch): remove invalid state properties (#15610)
1 parent c76d726 commit c6c146c

File tree

5 files changed

+0
-157
lines changed

5 files changed

+0
-157
lines changed

projects/igniteui-angular/src/lib/switch/themes/_base.scss

Lines changed: 0 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -212,14 +212,6 @@ $_theme: $material;
212212
}
213213
}
214214

215-
@include mx(focused, invalid) {
216-
@include e(ripple) {
217-
@extend %switch-ripple--focused;
218-
219-
background: var-get($_theme, 'error-color-hover');
220-
}
221-
}
222-
223215
@include m(checked) {
224216
@include e(composite) {
225217
background: var-get($_theme, 'track-on-color');
@@ -267,67 +259,6 @@ $_theme: $material;
267259
}
268260
}
269261

270-
@include m(invalid) {
271-
@include e(composite) {
272-
border-color: var-get($_theme, 'error-color');
273-
}
274-
275-
&:hover {
276-
@include e(ripple) {
277-
@extend %switch-ripple--hover;
278-
279-
background: var-get($_theme, 'error-color-hover');
280-
}
281-
}
282-
283-
&:active {
284-
@include e(ripple) {
285-
@extend %switch-ripple--hover;
286-
@extend %switch-ripple--pressed;
287-
288-
background: var-get($_theme, 'error-color-hover');
289-
}
290-
}
291-
292-
@include e(label) {
293-
color: var-get($_theme, 'label-invalid-color');
294-
}
295-
296-
@include e(label, $m: before) {
297-
color: var-get($_theme, 'label-invalid-color');
298-
}
299-
300-
@include e(thumb) {
301-
background: var-get($_theme, 'error-color');
302-
}
303-
}
304-
305-
@include mx(invalid, checked) {
306-
@include e(composite) {
307-
border-color: var-get($_theme, 'border-on-color');
308-
}
309-
310-
@include e(thumb) {
311-
background: var-get($_theme, 'thumb-on-error-color');
312-
}
313-
314-
&:hover {
315-
@include e(ripple) {
316-
@extend %switch-ripple--hover;
317-
318-
background: var-get($_theme, 'thumb-on-color');
319-
}
320-
}
321-
}
322-
323-
@include mx(focused, invalid, checked) {
324-
@include e(ripple) {
325-
@extend %switch-ripple--focused;
326-
327-
background: var-get($_theme, 'thumb-on-color');
328-
}
329-
}
330-
331262
@include m(disabled) {
332263
user-select: none;
333264
pointer-events: none;
@@ -360,17 +291,5 @@ $_theme: $material;
360291
background: var-get($_theme, 'thumb-on-disabled-color');
361292
}
362293
}
363-
364-
@include mx(disabled, invalid) {
365-
@include e(thumb) {
366-
background: var-get($_theme, 'thumb-disabled-color');
367-
}
368-
}
369-
370-
@include mx(disabled, invalid, checked) {
371-
@include e(thumb) {
372-
background: var-get($_theme, 'thumb-on-disabled-color');
373-
}
374-
}
375294
}
376295
}

projects/igniteui-angular/src/lib/switch/themes/shared/bootstrap.scss

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,6 @@ $_theme: $bootstrap;
5151
}
5252
}
5353

54-
@include mx(focused, invalid) {
55-
@include e(composite) {
56-
border-color: var-get($_theme, 'error-color');
57-
box-shadow: 0 0 0 rem(4px) var-get($_theme, 'error-color-hover');
58-
}
59-
60-
@include e(thumb) {
61-
background: var-get($_theme, 'error-color');
62-
}
63-
}
64-
6554
@include mx(disabled, checked) {
6655
@include e(composite) {
6756
border-color: var-get($_theme, 'track-on-disabled-color');

projects/igniteui-angular/src/lib/switch/themes/shared/fluent.scss

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,30 +34,6 @@ $_theme: $fluent;
3434
}
3535
}
3636

37-
@include m(invalid) {
38-
&:hover {
39-
@include e(composite) {
40-
border-color: var-get($_theme, 'error-color-hover');
41-
}
42-
43-
@include e(thumb) {
44-
background: var-get($_theme, 'error-color-hover');
45-
}
46-
}
47-
}
48-
49-
@include mx(invalid, checked) {
50-
&:hover {
51-
@include e(composite) {
52-
border-color: var-get($_theme, 'border-on-hover-color');
53-
}
54-
55-
@include e(thumb) {
56-
background: var-get($_theme, 'thumb-on-color');
57-
}
58-
}
59-
}
60-
6137
@include mx(disabled, checked) {
6238
@include e(composite) {
6339
border-color: var-get($_theme, 'track-on-disabled-color');

projects/igniteui-angular/src/lib/switch/themes/shared/indigo.scss

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,12 @@ $_theme: $indigo;
3131
}
3232
}
3333

34-
@include mx(focused, invalid) {
35-
@include e(composite) {
36-
box-shadow: 0 0 0 rem(3px) var-get($_theme, 'error-color-hover');
37-
}
38-
}
39-
4034
@include mx(focused, checked) {
4135
@include e(composite) {
4236
box-shadow: 0 0 0 rem(3px) var-get($_theme, 'focus-outline-color-focused');
4337
}
4438
}
4539

46-
@include mx(invalid, checked) {
47-
&:hover {
48-
@include e(composite) {
49-
border-color: var-get($_theme, 'border-on-hover-color');
50-
}
51-
}
52-
}
53-
5440
@include mx(disabled, checked) {
5541
@include e(composite) {
5642
border-color: transparent;

projects/igniteui-angular/src/lib/switch/themes/shared/material.scss

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -48,36 +48,9 @@ $_theme: $material;
4848
}
4949
}
5050

51-
@include m(invalid) {
52-
@include e(composite) {
53-
border-color: var-get($_theme, 'track-error-color');
54-
background: var-get($_theme, 'track-error-color');
55-
}
56-
}
57-
58-
@include mx(invalid, checked) {
59-
@include e(composite) {
60-
background: var-get($_theme, 'track-on-color');
61-
border-color: var-get($_theme, 'border-on-color');
62-
}
63-
}
64-
6551
@include m(disabled) {
6652
@include e(thumb) {
6753
box-shadow: var-get($_theme, 'disabled-elevation');
6854
}
6955
}
70-
71-
@include mx(disabled, invalid) {
72-
@include e(composite) {
73-
background: var-get($_theme, 'track-disabled-color');
74-
border-color: var-get($_theme, 'border-disabled-color');
75-
}
76-
}
77-
78-
@include mx(disabled, invalid, checked) {
79-
@include e(composite) {
80-
background: var-get($_theme, 'track-on-disabled-color');
81-
}
82-
}
8356
}

0 commit comments

Comments
 (0)