Skip to content

Commit

Permalink
fix(list): subheader margin being overwritten by typography
Browse files Browse the repository at this point in the history
Fixes the `.mat-subheader` margin being overwritten by the `.mat-typography` due to lower specificity.

Fixes angular#5639.
  • Loading branch information
crisbeto committed Jul 10, 2017
1 parent 557b31b commit 76db64c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/demo-app/list/list-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ <h1>md-list demo</h1>

<button md-raised-button (click)="thirdLine=!thirdLine" class="demo-button">Show third line</button>

<div class="demo">
<div class="demo mat-typography">
<div>
<h2>Normal lists</h2>

Expand Down
7 changes: 6 additions & 1 deletion src/lib/list/list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,12 @@ $mat-dense-list-icon-size: 20px;
display: block;
box-sizing: border-box;
padding: $mat-list-side-padding;
margin: 0;

// This needs slightly more specificity, because it
// can be overwritten by the typography styles.
.mat-list & {
margin: 0;
}
}

// This mixin adjusts the heights and padding based on whether the list is in dense mode.
Expand Down

0 comments on commit 76db64c

Please sign in to comment.