Skip to content

Commit 266c781

Browse files
committed
fix(badge): fix badge paddings when using projection content
1 parent 734f612 commit 266c781

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

projects/igniteui-angular/core/src/core/styles/components/badge/_badge-theme.scss

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
box-shadow: var-get($theme, 'elevation');
2828
overflow: hidden;
2929

30+
&:not(:has(igx-icon)) {
31+
padding-inline: pad-inline(rem(4px), rem(6px), if($variant == 'indigo', rem(6px), rem(8px)));
32+
}
33+
3034
igx-icon {
3135
--size: var(--igx-icon-size, #{sizable(rem(12px), rem(14px), rem(16px))});
3236
--component-size: var(--badge-size);
@@ -57,7 +61,6 @@
5761

5862
%igx-badge-value {
5963
white-space: nowrap;
60-
padding-inline: pad-inline(rem(4px), rem(6px), if($variant == 'indigo', rem(6px), rem(8px)));
6164
}
6265

6366
%igx-badge--success {
@@ -102,7 +105,10 @@
102105

103106
min-width: var(--_dot-size);
104107
min-height: var(--_dot-size);
105-
padding: 0;
108+
109+
&:not(:has(igx-icon)) {
110+
padding: 0;
111+
}
106112

107113
igx-icon,
108114
> * {

0 commit comments

Comments
 (0)