Skip to content

Commit f17e8d4

Browse files
authored
refactor(expansion-panel): bundle styles with component (#15476)
1 parent 3370322 commit f17e8d4

File tree

22 files changed

+330
-40
lines changed

22 files changed

+330
-40
lines changed

projects/igniteui-angular/src/lib/core/styles/components/grid/_pivot-data-selector-theme.scss

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
}
113113
}
114114

115-
%igx-expansion-panel__body {
115+
.igx-expansion-panel__body {
116116
position: relative;
117117
height: rem(128px);
118118
font-size: rem(14px);
@@ -124,11 +124,11 @@
124124
}
125125
}
126126

127-
%igx-expansion-panel__header-icon--start {
127+
.igx-expansion-panel__header-icon--start {
128128
margin-inline-end: rem(8px);
129129
}
130130

131-
%igx-expansion-panel__header-title {
131+
.igx-expansion-panel__header-title {
132132
display: flex;
133133

134134
> h6 {
@@ -137,7 +137,7 @@
137137
}
138138
}
139139

140-
%igx-expansion-panel__header-inner {
140+
.igx-expansion-panel__header-inner {
141141
background: var-get($theme, 'header-color');
142142
padding: $panel-padding;
143143

@@ -235,9 +235,7 @@
235235
%selector-base,
236236
%selector-item-ghost {
237237
igx-icon {
238-
width: var(--igx-icon-size, #{rem(18px)});
239-
height: var(--igx-icon-size, #{rem(18px)});
240-
font-size: var(--igx-icon-size, #{rem(18px)});
238+
--size: var(--igx-icon-size, #{rem(18px)});
241239
}
242240
}
243241

projects/igniteui-angular/src/lib/core/styles/components/icon-button/_icon-button-theme.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,9 @@
186186

187187
igx-icon {
188188
--component-size: var(--ig-size, var(--ig-size-large));
189+
--size: var(--igx-icon-size, #{$icon-in-button-size});
189190
display: flex;
190191
justify-content: center;
191-
width: var(--igx-icon-size, #{$icon-in-button-size});
192-
height: var(--igx-icon-size, #{$icon-in-button-size});
193-
font-size: var(--igx-icon-size, #{$icon-in-button-size});
194192
}
195193

196194
@if $variant == 'fluent' {

projects/igniteui-angular/src/lib/core/styles/themes/generators/_base.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -416,13 +416,13 @@
416416
@include drop-down($drop-down-theme-map);
417417
}
418418

419-
@if is-used('igx-expansion-panel', $exclude) {
420-
$expansion-panel-theme-map: expansion-panel-theme(
421-
$schema: $schema,
422-
);
423-
$expansion-panel-theme-map: meta.call($theme-handler, $expansion-panel-theme-map);
424-
@include expansion-panel($expansion-panel-theme-map);
425-
}
419+
// @if is-used('igx-expansion-panel', $exclude) {
420+
// $expansion-panel-theme-map: expansion-panel-theme(
421+
// $schema: $schema,
422+
// );
423+
// $expansion-panel-theme-map: meta.call($theme-handler, $expansion-panel-theme-map);
424+
// @include expansion-panel($expansion-panel-theme-map);
425+
// }
426426

427427
@if is-used('igx-grid', $exclude) {
428428
$grid-theme-map: grid-theme(

projects/igniteui-angular/src/lib/core/styles/typography/_bootstrap.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@
6969
item: 'body-2',
7070
select-item: 'body-2'
7171
));
72-
@include expansion-panel-typography($categories: (
73-
title: 'h5',
74-
description: 'subtitle-2',
75-
body: 'body-2'
76-
));
72+
// @include expansion-panel-typography($categories: (
73+
// title: 'h5',
74+
// description: 'subtitle-2',
75+
// body: 'body-2'
76+
// ));
7777
@include excel-filtering-typography();
7878
@include icon-button-typography();
7979
@include input-group-typography($categories: (

projects/igniteui-angular/src/lib/core/styles/typography/_fluent.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@
7272
item: 'body-2',
7373
select-item: 'body-2'
7474
));
75-
@include expansion-panel-typography($categories: (
76-
title: 'subtitle-1',
77-
description: 'body-2',
78-
body: 'caption'
79-
));
75+
// @include expansion-panel-typography($categories: (
76+
// title: 'subtitle-1',
77+
// description: 'body-2',
78+
// body: 'caption'
79+
// ));
8080
@include excel-filtering-typography();
8181
@include icon-button-typography();
8282
@include input-group-typography($categories: (

projects/igniteui-angular/src/lib/core/styles/typography/_indigo.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@
6767
));
6868
@include dock-manager-typography();
6969
@include drop-down-typography();
70-
@include expansion-panel-typography($categories: (
71-
title: 'body-2',
72-
body: 'body-2',
73-
description: 'body-2',
74-
));
70+
// @include expansion-panel-typography($categories: (
71+
// title: 'body-2',
72+
// body: 'body-2',
73+
// description: 'body-2',
74+
// ));
7575
@include excel-filtering-typography();
7676
@include icon-button-typography();
7777
@include input-group-typography($categories: (

projects/igniteui-angular/src/lib/core/styles/typography/_material.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
@include dialog-typography();
4949
@include dock-manager-typography();
5050
@include drop-down-typography();
51-
@include expansion-panel-typography();
51+
// @include expansion-panel-typography();
5252
@include excel-filtering-typography();
5353
@include icon-button-typography();
5454
@include input-group-typography();

projects/igniteui-angular/src/lib/expansion-panel/expansion-panel-header.component.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
<ng-content select="igx-expansion-panel-description"></ng-content>
66
</div>
77
<ng-content></ng-content>
8-
<div [class]="iconPositionClass">
8+
<div
9+
[class]="iconPositionClass"
10+
[class.igx-expansion-panel__header-icon]="true"
11+
>
912
@if (iconTemplate) {
1013
<ng-content select="igx-expansion-panel-icon"></ng-content>
1114
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@use 'themes/base';
2+
@use 'themes/shared';
3+
@use 'themes/light';
4+
@use 'themes/dark';

projects/igniteui-angular/src/lib/expansion-panel/expansion-panel.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
Inject,
1010
Input,
1111
Output,
12+
ViewEncapsulation,
1213
booleanAttribute
1314
} from '@angular/core';
1415
import { IgxAngularAnimationService } from '../services/animation/angular-animation-service';
@@ -28,6 +29,8 @@ let NEXT_ID = 0;
2829
@Component({
2930
selector: 'igx-expansion-panel',
3031
templateUrl: 'expansion-panel.component.html',
32+
styleUrl: 'expansion-panel.component.css',
33+
encapsulation: ViewEncapsulation.None,
3134
providers: [{ provide: IGX_EXPANSION_PANEL_COMPONENT, useExisting: IgxExpansionPanelComponent }],
3235
imports: []
3336
})

0 commit comments

Comments
 (0)