Skip to content

Commit

Permalink
style(expansion): simplify vertical centering in header (#5950)
Browse files Browse the repository at this point in the history
  • Loading branch information
willshowell authored and tinayuangao committed Aug 4, 2017
1 parent 787a8f0 commit 73c6d8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
10 changes: 1 addition & 9 deletions src/lib/expansion/expansion-panel-header.scss
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
$mat-expansion-panel-header-height: 48px;
$mat-expansion-panel-header-height-expanded: 64px;

.mat-expansion-panel-header {
cursor: pointer;
display: flex;
flex-direction: row;
height: $mat-expansion-panel-header-height;
line-height: $mat-expansion-panel-header-height;
align-items: center;
padding: 0 24px;

&.mat-expanded {
height: $mat-expansion-panel-header-height-expanded;
line-height: $mat-expansion-panel-header-height-expanded;
}

&:focus,
&:hover {
outline: none;
Expand Down
4 changes: 2 additions & 2 deletions src/lib/expansion/expansion-panel-header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ import {Subscription} from 'rxjs/Subscription';
transition('expanded <=> collapsed', animate(EXPANSION_PANEL_ANIMATION_TIMING)),
]),
trigger('expansionHeight', [
state('collapsed', style({height: '48px', 'line-height': '48px'})),
state('expanded', style({height: '64px', 'line-height': '64px'})),
state('collapsed', style({height: '48px'})),
state('expanded', style({height: '64px'})),
transition('expanded <=> collapsed', animate(EXPANSION_PANEL_ANIMATION_TIMING)),
]),
],
Expand Down

0 comments on commit 73c6d8d

Please sign in to comment.