Skip to content

Commit e77a946

Browse files
committed
fix(material/list): not working correctly when list item is used as a button
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.
1 parent 23f3929 commit e77a946

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/material/list/list.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,14 @@ $item-inset-divider-offset: 72px;
203203
}
204204
}
205205

206+
// We need some extra resets when the list items are buttons.
207+
button.mat-list-item, button.mat-list-option {
208+
border: none;
209+
background: none;
210+
padding: 0;
211+
width: 100%;
212+
}
213+
206214
// This mixin adjusts the heights and padding based on whether the list is in dense mode.
207215
@mixin subheader-spacing($top-padding, $base-height) {
208216
height: $base-height;

0 commit comments

Comments
 (0)