@@ -15,6 +15,7 @@ $mat-list-avatar-height: 56px;
15
15
// spec requires two- and three-line lists be taller
16
16
$mat-list-two-line-height : 72px ;
17
17
$mat-list-three-line-height : 88px ;
18
+ $mat-list-multi-line-padding : 16px ;
18
19
$mat-list-icon-size : 24px ;
19
20
20
21
// Dense list variables
@@ -23,12 +24,13 @@ $mat-dense-base-height: 40px;
23
24
$mat-dense-avatar-height : 48px ;
24
25
$mat-dense-two-line-height : 60px ;
25
26
$mat-dense-three-line-height : 76px ;
27
+ $mat-dense-multi-line-padding : 16px ;
26
28
$mat-dense-list-icon-size : 20px ;
27
29
28
30
// This mixin provides all list-item styles, changing font size and height
29
31
// based on whether the list is in dense mode.
30
- @mixin mat-list-item-base ($base-height , $avatar-height ,
31
- $two -line-height , $three -line-height , $icon-size ) {
32
+ @mixin mat-list-item-base ($base-height , $avatar-height , $two-line-height ,
33
+ $three -line-height , $multi -line-padding , $icon-size ) {
32
34
33
35
// Prevents the wrapper `mat-list-item-content` from collapsing due to it
34
36
// being `inline` by default.
@@ -78,8 +80,12 @@ $mat-dense-list-icon-size: 20px;
78
80
// list items with more than 3 lines should expand to match
79
81
// the height of its contained text
80
82
& .mat-multi-line {
81
- height : 100% ;
82
- padding : 8px $mat-list-side-padding ;
83
+ height : auto ;
84
+
85
+ .mat-list-item-content {
86
+ padding-top : $multi-line-padding ;
87
+ padding-bottom : $multi-line-padding ;
88
+ }
83
89
}
84
90
85
91
.mat-list-text {
@@ -145,22 +151,13 @@ $mat-dense-list-icon-size: 20px;
145
151
@include mat-subheader-spacing ($mat-list-top-padding , $mat-list-base-height );
146
152
}
147
153
148
- .mat-list-item {
149
- @include mat-list-item-base (
150
- $mat-list-base-height ,
151
- $mat-list-avatar-height ,
152
- $mat-list-two-line-height ,
153
- $mat-list-three-line-height ,
154
- $mat-list-icon-size
155
- );
156
- }
157
-
158
- .mat-list-option {
154
+ .mat-list-item , .mat-list-option {
159
155
@include mat-list-item-base (
160
156
$mat-list-base-height ,
161
157
$mat-list-avatar-height ,
162
158
$mat-list-two-line-height ,
163
159
$mat-list-three-line-height ,
160
+ $mat-list-multi-line-padding ,
164
161
$mat-list-icon-size
165
162
);
166
163
}
@@ -176,22 +173,13 @@ $mat-dense-list-icon-size: 20px;
176
173
@include mat-subheader-spacing ($mat-dense-top-padding , $mat-dense-base-height );
177
174
}
178
175
179
- .mat-list-item {
180
- @include mat-list-item-base (
181
- $mat-dense-base-height ,
182
- $mat-dense-avatar-height ,
183
- $mat-dense-two-line-height ,
184
- $mat-dense-three-line-height ,
185
- $mat-dense-list-icon-size
186
- );
187
- }
188
-
189
- .mat-list-option {
176
+ .mat-list-item , .mat-list-option {
190
177
@include mat-list-item-base (
191
178
$mat-dense-base-height ,
192
179
$mat-dense-avatar-height ,
193
180
$mat-dense-two-line-height ,
194
181
$mat-dense-three-line-height ,
182
+ $mat-dense-multi-line-padding ,
195
183
$mat-dense-list-icon-size
196
184
);
197
185
}
0 commit comments