Skip to content

Commit

Permalink
fix(list): not working correctly when list item is used as a button
Browse files Browse the repository at this point in the history
Based on our selector for `mat-list-item`, we allow it to be a `button`, however we don't do the necessary resets for it to be usable.
  • Loading branch information
crisbeto committed Oct 3, 2019
1 parent 5a65a63 commit 154c89b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/material/list/list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ $mat-list-item-inset-divider-offset: 72px;
height: $base-height;
-webkit-tap-highlight-color: transparent;

// Override the user agent styling if the list item is a button.
width: 100%;
// Button resets.
border: none;
background: none;
padding: 0;
width: 100%;

.mat-list-item-content {
display: flex;
Expand Down

0 comments on commit 154c89b

Please sign in to comment.