Skip to content

Commit d1d2e18

Browse files
authored
fix(list): fix padding for list items (#4486)
1 parent 4ca16d7 commit d1d2e18

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/lib/list/list.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ $mat-dense-list-icon-size: 20px;
8080
@include mat-line-wrapper-base();
8181
padding: 0 $mat-list-side-padding;
8282

83-
&:first-child {
83+
// We only want to override the padding if there isn't
84+
// an avatar or icon before the element. Since the ripple
85+
// will always be the first child in the container, we
86+
// check whether this element is the second child.
87+
&:nth-child(2) {
8488
padding: 0;
8589
}
8690
}

0 commit comments

Comments
 (0)