Skip to content

Commit aa77aa1

Browse files
crisbetoandrewseguin
authored andcommitted
fix(expansion-panel): prevent content from being clipped (#7617)
Removes the overflows from expansion panels that aren't animating in order avoid clipping content, as well as things like ripples. Relates to #7616.
1 parent 90a55fa commit aa77aa1

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/demo-app/expansion/expansion-demo.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ <h1>Single Expansion Panel</h1>
55
<mat-panel-description>This is a panel description.</mat-panel-description>
66
<mat-panel-title>Panel Title</mat-panel-title>
77
</mat-expansion-panel-header>
8+
89
This is the content text that makes sense here.
10+
<mat-checkbox>Trigger a ripple</mat-checkbox>
11+
912
<mat-action-row>
1013
<button mat-button (click)="myPanel.expanded = false">CANCEL</button>
1114
<button mat-button>SAVE</button>

src/lib/expansion/expansion-panel.scss

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,17 @@
1111
}
1212

1313
.mat-expansion-panel-content {
14-
overflow: hidden;
14+
.mat-expanded & {
15+
overflow: visible;
16+
}
17+
18+
&, &.ng-animating {
19+
overflow: hidden;
20+
}
1521
}
1622

1723
.mat-expansion-panel-body {
18-
margin: 0 24px 16px;
19-
overflow: auto;
24+
padding: 0 24px 16px;
2025
}
2126

2227
.mat-expansion-panel-spacing {

0 commit comments

Comments
 (0)