Skip to content

Commit 053be33

Browse files
authored
feat(avatar): improve avatar theme (#15480)
1 parent 09e3ffb commit 053be33

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

projects/igniteui-angular/src/lib/core/styles/components/avatar/_avatar-theme.scss

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,13 @@
4141
}
4242

4343
$theme: digest-schema($avatar-schema);
44-
$meta: map.get($theme, '_meta');
4544

4645
@if not($color) and $background {
47-
$color: text-contrast($background);
46+
$color: adaptive-contrast($background);
47+
}
48+
49+
@if not($icon-color) and $background {
50+
$icon-color: adaptive-contrast($background);
4851
}
4952

5053
@return extend($theme, (
@@ -54,10 +57,6 @@
5457
icon-color: $icon-color,
5558
border-radius: $border-radius,
5659
size: $size,
57-
theme: map.get($schema, '_meta', 'theme'),
58-
_meta: map.merge(if($meta, $meta, ()), (
59-
variant: map.get($schema, '_meta', 'theme')
60-
)),
6160
));
6261
}
6362

@@ -68,7 +67,7 @@
6867
@include css-vars($theme);
6968

7069
$variant: map.get($theme, '_meta', 'variant');
71-
70+
7271
%igx-avatar-display {
7372
@include sizable();
7473

0 commit comments

Comments
 (0)