Skip to content

Commit ba44a7a

Browse files
committed
fix(material/list): list item truncates on narrow screen widths
Updates fix for Angular Components List component where the list item truncates on narrow screen widths (ie. mobile screens). Updates the padding to be more cohesive with previous styling. Fixes b/291296866
1 parent c1a0a27 commit ba44a7a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/material/list/list.scss

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,6 @@ a.mdc-list-item--activated {
162162
}
163163
}
164164

165-
.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines
166-
.mdc-list-item__primary-text::before {
167-
height: 25px;
168-
}
169-
170165
// Increased list item height if it has multiple lines so bottom line doesn't get
171166
// cut off. Also added padding-bottom so there's space btw the text and the divider.
172167
.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines,
@@ -176,12 +171,13 @@ a.mdc-list-item--activated {
176171
.mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-three-lines,
177172
.mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-three-lines {
178173
height: auto;
179-
padding-bottom: 12px;
174+
padding-bottom: 16px;
180175
}
181176

182177
.mat-mdc-list-item.mdc-list-item--with-three-lines,
183178
.mat-mdc-list-item.mdc-list-item--with-two-lines {
184179
height: auto;
180+
padding: 13px;
185181
// List item lines must wrap according to GAR 1.18(b). Removing the nowrap and
186182
// adjusts .mat-mdc-list-item-title.mdc-list-item__primary-text height
187183
// to accommodate any wrapping text. Fixes: b/247881646.

0 commit comments

Comments
 (0)