Skip to content

Commit a89d3da

Browse files
authored
fix(themes): igx-icon gets overridden multiple themes (#15222)
1 parent d2bc4ff commit a89d3da

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
@@ -386,7 +386,7 @@
386386
}
387387

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

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
@@ -1206,7 +1206,7 @@
12061206
} @else {
12071207
padding-inline: pad-inline(rem(8px), rem(12px), rem(16px));
12081208

1209-
%igx-icon-display {
1209+
igx-icon {
12101210
opacity: if($theme-variant == 'light', .75, .85);
12111211

12121212
&:hover {
@@ -1460,12 +1460,12 @@
14601460
} @else {
14611461
padding-inline: pad-inline(rem(8px), rem(12px), rem(16px));
14621462

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

14671467
&:hover {
1468-
%igx-icon-display {
1468+
igx-icon {
14691469
opacity: 1;
14701470
}
14711471
}
@@ -2037,13 +2037,10 @@
20372037
position: relative;
20382038
display: flex;
20392039

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

@@ -2149,15 +2146,15 @@
21492146
%grid-excel-icon {
21502147
color: var-get($theme, 'header-selected-text-color');
21512148

2152-
%igx-icon-display {
2149+
igx-icon {
21532150
color: var-get($theme, 'header-selected-text-color');
21542151
}
21552152

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

2160-
%igx-icon-display {
2157+
igx-icon {
21612158
color: var-get($theme, 'header-selected-text-color');
21622159
}
21632160
}
@@ -2501,7 +2498,7 @@
25012498
}
25022499

25032500
%igx-group-label__icon {
2504-
&.igx-icon {
2501+
@at-root igx-icon#{&} {
25052502
--component-size: #{if($variant == 'indigo', 2, 1)};
25062503

25072504
color: var-get($theme, 'group-label-icon');
@@ -3449,10 +3446,9 @@
34493446
}
34503447

34513448
@if $variant == 'indigo' {
3452-
%igx-icon-display {
3449+
igx-icon {
34533450
opacity: if($theme-variant == 'light', .75, .85);
34543451

3455-
34563452
&:hover {
34573453
opacity: 1;
34583454
cursor: pointer;

0 commit comments

Comments
 (0)