Skip to content

Commit c4e12b5

Browse files
devversionandrewseguin
authored andcommitted
refactor(list): easier overriding of list-item height (#8120)
* Makes it easier for developers to override the height of a list-item. Fixes #8067
1 parent 02d3eb6 commit c4e12b5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/lib/list/list.scss

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,16 @@ $mat-dense-list-icon-size: 20px;
3333
// Prevents the wrapper `mat-list-item-content` from collapsing due to it
3434
// being `inline` by default.
3535
display: block;
36+
height: $base-height;
3637

3738
.mat-list-item-content {
3839
display: flex;
3940
flex-direction: row;
4041
align-items: center;
4142
box-sizing: border-box;
42-
height: $base-height;
4343
padding: 0 $mat-list-side-padding;
4444
position: relative;
45+
height: inherit;
4546
}
4647

4748
.mat-list-item-content-reverse {
@@ -61,22 +62,22 @@ $mat-dense-list-icon-size: 20px;
6162
pointer-events: none;
6263
}
6364

64-
&.mat-list-item-avatar .mat-list-item-content {
65+
&.mat-list-item-avatar {
6566
height: $avatar-height;
6667
}
6768

68-
&.mat-2-line .mat-list-item-content {
69+
&.mat-2-line {
6970
height: $two-line-height;
7071
}
7172

7273

73-
&.mat-3-line .mat-list-item-content {
74+
&.mat-3-line {
7475
height: $three-line-height;
7576
}
7677

7778
// list items with more than 3 lines should expand to match
7879
// the height of its contained text
79-
&.mat-multi-line .mat-list-item-content {
80+
&.mat-multi-line {
8081
height: 100%;
8182
padding: 8px $mat-list-side-padding;
8283
}

0 commit comments

Comments
 (0)