Skip to content

Commit 27f9c99

Browse files
crisbetommalerba
authored andcommitted
fix(list): prevent list item wrapper elements from collapsing (#2075)
Adds a `display: block` to the list items, in order to prevent them from collapsing. This allows users to set a custom background directly on the list item. Fixes #2012.
1 parent 539e44e commit 27f9c99

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lib/list/list.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ $md-dense-three-line-height: 76px;
3131
@mixin md-list-item-base($font-size, $base-height, $avatar-height,
3232
$two-line-height, $three-line-height) {
3333

34+
// Prevents the wrapper `md-list-item` from collapsing due to it being `inline` by default.
35+
display: block;
36+
3437
.md-list-item {
3538
display: flex;
3639
flex-direction: row;

0 commit comments

Comments
 (0)