Skip to content

Commit ccbae0b

Browse files
crisbetojelbourn
authored andcommitted
feat(expansion-panel): align with 2018 material design spec (#12670)
Aligns the expansion panel with the latest Material Design spec.
1 parent baf6419 commit ccbae0b

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/lib/expansion/expansion-panel-header.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
flex-direction: row;
55
align-items: center;
66
padding: 0 24px;
7+
border-radius: inherit;
78

89
&:focus,
910
&:hover {

src/lib/expansion/expansion-panel.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,31 @@
33
@import '../../cdk/a11y/a11y';
44

55
.mat-expansion-panel {
6+
$border-radius: 4px;
7+
68
@include mat-elevation-transition;
79
@include mat-overridable-elevation(2);
810
box-sizing: content-box;
911
display: block;
1012
margin: 0;
1113
transition: margin 225ms $mat-fast-out-slow-in-timing-function;
14+
border-radius: $border-radius;
15+
16+
.mat-accordion & {
17+
&:not(.mat-expanded), &:not(.mat-expansion-panel-spacing) {
18+
border-radius: 0;
19+
}
20+
21+
&:first-of-type {
22+
border-top-right-radius: $border-radius;
23+
border-top-left-radius: $border-radius;
24+
}
25+
26+
&:last-of-type {
27+
border-bottom-right-radius: $border-radius;
28+
border-bottom-left-radius: $border-radius;
29+
}
30+
}
1231

1332
@include cdk-high-contrast {
1433
outline: solid 1px;

0 commit comments

Comments
 (0)