Skip to content

Commit c94c5e0

Browse files
authored
Merge pull request #1222 from IgniteUI/ibarakov/fix-avatar-styling
[WC] Set background through correct css var
2 parents 550112d + 1a8a500 commit c94c5e0

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

samples/interactions/chat/features/src/index.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,15 @@ export class ChatOverview {
4141
id: '4',
4242
text:
4343
`
44-
Thank you for your patience. It seems that the issue is the name of the CSS part. Here is the fixed code:
44+
Thank you for your patience. The background should be applied using the \`--ig-avatar-background\` CSS variable on the \`igc-avatar\` host element. Here is the fixed code:
4545
\`\`\`css
46+
igc-avatar {
47+
--ig-avatar-size: 60px;
48+
--ig-avatar-color: var(--ig-success-500-contrast);
49+
--ig-avatar-background: var(--ig-success-500);
50+
}
51+
4652
igc-avatar::part(base) {
47-
--size: 60px;
48-
color: var(--ig-success-500-contrast);
49-
background: var(--ig-success-500);
5053
border-radius: 20px;
5154
}
5255
\`\`\`
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
igc-avatar {
2+
--ig-avatar-size: 60px;
3+
--ig-avatar-color: var(--ig-success-500-contrast);
4+
--ig-avatar-background: var(--ig-success-500);
5+
}
6+
17
igc-avatar::part(base) {
2-
--size: 60px;
3-
color: var(--ig-success-500-contrast);
4-
background: var(--ig-success-500);;
58
border-radius: 20px;
69
}

0 commit comments

Comments
 (0)