Skip to content

Commit 5ff322e

Browse files
fix(chip): fix avatar inside igx-suffix and igx-prefix directive (#13695)
Co-authored-by: Hristo <[email protected]>
1 parent 6987c1f commit 5ff322e

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

projects/igniteui-angular/src/lib/core/styles/components/chip/_chip-theme.scss

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,6 @@
376376
align-items: center;
377377
justify-content: center;
378378
text-align: center;
379-
flex: 1 1 auto;
380379
height: var-get($theme, 'size');
381380
padding-inline: sizable(
382381
map.get($chip-padding, 'compact'),
@@ -411,9 +410,9 @@
411410

412411
igx-avatar,
413412
igx-circular-bar {
414-
max-width: 100%;
415413
max-height: 100%;
416414
width: sizable(rem(14px), rem(18px), rem(24px));
415+
max-width: sizable(rem(14px), rem(18px), rem(24px));
417416
height: sizable(rem(14px), rem(18px), rem(24px));
418417
}
419418

@@ -655,21 +654,41 @@
655654
}
656655

657656
%igx-chip__start {
658-
igx-avatar,
659-
igx-circular-bar {
657+
> igx-avatar,
658+
> igx-circular-bar {
660659
&:first-child {
661660
margin-inline-start: calc(#{sizable(rem(0), rem(4px), rem(8px))} * -1);
662661
}
663662
}
663+
664+
[igxPrefix],
665+
igx-prefix {
666+
&:first-of-type {
667+
igx-avatar,
668+
igx-circular-bar {
669+
margin-inline-start: calc(#{sizable(rem(0), rem(4px), rem(8px))} * -1);
670+
}
671+
}
672+
}
664673
}
665674

666675
%igx-chip__end {
667-
igx-avatar,
668-
igx-circular-bar {
676+
> igx-avatar,
677+
> igx-circular-bar {
669678
&:last-child {
670679
margin-inline-end: calc(#{sizable(rem(0), rem(4px), rem(8px))} * -1);
671680
}
672681
}
682+
683+
[igxPrefix],
684+
igx-prefix {
685+
&:first-of-type {
686+
igx-avatar,
687+
igx-circular-bar {
688+
margin-inline-end: calc(#{sizable(rem(0), rem(4px), rem(8px))} * -1);
689+
}
690+
}
691+
}
673692
}
674693

675694
%igx-chip__start,
@@ -694,8 +713,7 @@
694713

695714
%igx-chip__prefix,
696715
%igx-chip__suffix {
697-
@include ellipsis();
698-
display: inline-block;
716+
display: inline-flex;
699717
vertical-align: middle;
700718
max-width: $chip-max-width;
701719

0 commit comments

Comments
 (0)