Skip to content

Commit 06959f3

Browse files
authored
fix(themes): igx-icon gets overridden multiple themes (#15220)
1 parent 70f3831 commit 06959f3

File tree

4 files changed

+17
-25
lines changed

4 files changed

+17
-25
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@
384384
}
385385

386386
@if $variant == 'indigo' {
387-
%igx-icon-display {
387+
igx-icon {
388388
--size: #{sizable(rem(14px), rem(14px), rem(16px))}
389389
}
390390
}

projects/igniteui-angular/src/lib/core/styles/components/combo/_combo-theme.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,14 @@
174174
// The wrapping element here is needed
175175
// in order to override the !important rule of .igx-icon--inactive.
176176
%igx-combo__case-icon {
177-
.igx-icon {
177+
igx-icon {
178178
// Important is needed since the .igx-icon--inactive has !important
179179
color: color($color: 'gray', $variant: 600) !important;
180180
}
181181
}
182182

183183
%igx-combo__case-icon--active {
184-
.igx-icon {
184+
igx-icon {
185185
color: color($color: 'primary')
186186
}
187187
}

projects/igniteui-angular/src/lib/core/styles/components/grid/_excel-filtering-theme.scss

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,9 @@
9999
}
100100
}
101101

102-
igx-icon {
103-
@if $variant == 'indigo' {
104-
--component-size: 2;
105-
} @else {
106-
width: var(--igx-icon-size, #{rem(15px)});
107-
height: var(--igx-icon-size, #{rem(15px)});
108-
font-size: var(--igx-icon-size, #{rem(15px)});
102+
@if $variant != 'indigo' {
103+
igx-icon {
104+
--size: var(--igx-icon-size, #{rem(15px)});
109105
}
110106
}
111107
}

projects/igniteui-angular/src/lib/core/styles/components/grid/_grid-theme.scss

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@
12041204
} @else {
12051205
padding-inline: pad-inline(rem(8px), rem(12px), rem(16px));
12061206

1207-
%igx-icon-display {
1207+
igx-icon {
12081208
opacity: if($theme-variant == 'light', .75, .85);
12091209

12101210
&:hover {
@@ -1458,12 +1458,12 @@
14581458
} @else {
14591459
padding-inline: pad-inline(rem(8px), rem(12px), rem(16px));
14601460

1461-
%igx-icon-display {
1461+
igx-icon {
14621462
opacity: if($theme-variant == 'light', .75, .85);
14631463
}
14641464

14651465
&:hover {
1466-
%igx-icon-display {
1466+
igx-icon {
14671467
opacity: 1;
14681468
}
14691469
}
@@ -2035,13 +2035,10 @@
20352035
position: relative;
20362036
display: flex;
20372037

2038-
igx-icon {
2039-
@if $variant == 'indigo' {
2040-
--component-size: 2;
2041-
} @else {
2042-
width: var(--igx-icon-size, #{rem(15px)});
2043-
height: var(--igx-icon-size, #{rem(15px)});
2044-
font-size: var(--igx-icon-size, #{rem(15px)});
2038+
2039+
@if $variant != 'indigo' {
2040+
igx-icon {
2041+
--size: var(--igx-icon-size, #{rem(15px)});
20452042
}
20462043
}
20472044

@@ -2147,15 +2144,15 @@
21472144
%grid-excel-icon {
21482145
color: var-get($theme, 'header-selected-text-color');
21492146

2150-
%igx-icon-display {
2147+
igx-icon {
21512148
color: var-get($theme, 'header-selected-text-color');
21522149
}
21532150

21542151
&:focus,
21552152
&:hover {
21562153
color: var-get($theme, 'header-selected-text-color');
21572154

2158-
%igx-icon-display {
2155+
igx-icon {
21592156
color: var-get($theme, 'header-selected-text-color');
21602157
}
21612158
}
@@ -2499,7 +2496,7 @@
24992496
}
25002497

25012498
%igx-group-label__icon {
2502-
&.igx-icon {
2499+
@at-root igx-icon#{&} {
25032500
--component-size: #{if($variant == 'indigo', 2, 1)};
25042501

25052502
color: var-get($theme, 'group-label-icon');
@@ -3447,10 +3444,9 @@
34473444
}
34483445

34493446
@if $variant == 'indigo' {
3450-
%igx-icon-display {
3447+
igx-icon {
34513448
opacity: if($theme-variant == 'light', .75, .85);
34523449

3453-
34543450
&:hover {
34553451
opacity: 1;
34563452
cursor: pointer;

0 commit comments

Comments
 (0)