File tree Expand file tree Collapse file tree 3 files changed +31
-18
lines changed
projects/igniteui-angular/src/lib/core/styles/components Expand file tree Collapse file tree 3 files changed +31
-18
lines changed Original file line number Diff line number Diff line change 1
1
@use ' sass:map' ;
2
+ @use ' sass:meta' ;
2
3
@use ' sass:color' ;
3
4
@use ' ../../base' as * ;
4
5
@use ' ../../themes/schemas' as * ;
114
115
}
115
116
116
117
@if not ($hover-background ) and $background {
117
- $hover-background : color .scale ($background , $lightness : 5% );
118
+ @if meta .type-of ($background ) == ' color' {
119
+ $hover-background : color .scale ($background , $lightness : 5% );
120
+ }
118
121
}
119
122
120
123
@if not ($hover-foreground ) and $hover-background {
121
- $hover-foreground : text-contrast ($hover-background );
124
+ @if meta .type-of ($hover-background ) == ' color' {
125
+ $hover-foreground : text-contrast ($hover-background );
126
+ }
122
127
}
123
128
124
129
@if not ($focus-background ) and $background {
Original file line number Diff line number Diff line change 393
393
}
394
394
395
395
@if not ($filtering-header-background ) and $header-background {
396
- @if meta .type-of ($header-background ) == ' color' and luminance ($header-background ) < .5 {
397
- $filtering-header-background : to-opaque (color .scale ($header-background , $lightness : 5% ));
398
- } @else {
399
- $filtering-header-background : to-opaque (color .scale ($header-background , $lightness : -5% ));
396
+ @if meta .type-of ($header-background ) == ' color' {
397
+ @if luminance ($header-background ) < .5 {
398
+ $filtering-header-background : to-opaque (color .scale ($header-background , $lightness : 5% ));
399
+ } @else {
400
+ $filtering-header-background : to-opaque (color .scale ($header-background , $lightness : -5% ));
401
+ }
400
402
}
401
403
}
402
404
405
407
}
406
408
407
409
@if not ($filtering-row-background ) and $header-background {
408
- @if meta .type-of ($header-background ) == ' color' and luminance ($header-background ) < .5 {
409
- $filtering-row-background : to-opaque (color .scale ($header-background , $lightness : 5% ));
410
- } @else {
411
- $filtering-row-background : to-opaque (color .scale ($header-background , $lightness : -5% ));
410
+ @if meta .type-of ($header-background ) == ' color' {
411
+ @if luminance ($header-background ) < .5 {
412
+ $filtering-row-background : to-opaque (color .scale ($header-background , $lightness : 5% ));
413
+ } @else {
414
+ $filtering-row-background : to-opaque (color .scale ($header-background , $lightness : -5% ));
415
+ }
412
416
}
413
417
}
414
418
Original file line number Diff line number Diff line change 100
100
}
101
101
102
102
@if not ($item-background-hover ) and $item-background {
103
- @if meta .type-of ($item-background ) == ' color' and luminance ($item-background ) < .5 {
104
- $item-background-hover : color .scale ($item-background , $lightness : 8% );
105
- } @else {
106
- $item-background-hover : color .scale ($item-background , $lightness : -8% );
103
+ @if meta .type-of ($item-background ) == ' color' {
104
+ @if luminance ($item-background ) < .5 {
105
+ $item-background-hover : color .scale ($item-background , $lightness : 8% );
106
+ } @else {
107
+ $item-background-hover : color .scale ($item-background , $lightness : -8% );
108
+ }
107
109
}
108
110
}
109
111
110
112
@if not ($item-background-active ) and $item-background {
111
- @if meta .type-of ($item-background ) == ' color' and luminance ($item-background ) < .5 {
112
- $item-background-active : color .scale ($item-background , $lightness : 8% );
113
- } @else {
114
- $item-background-active : color .scale ($item-background , $lightness : -8% );
113
+ @if meta .type-of ($item-background ) == ' color' {
114
+ @if luminance ($item-background ) < .5 {
115
+ $item-background-active : color .scale ($item-background , $lightness : 8% );
116
+ } @else {
117
+ $item-background-active : color .scale ($item-background , $lightness : -8% );
118
+ }
115
119
}
116
120
}
117
121
You can’t perform that action at this time.
0 commit comments