Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 9759440

Browse files
committed
fix(list): fix clipping on list items, simplify code
closes #2199
1 parent acbf293 commit 9759440

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/components/list/list.scss

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
$list-h3-margin: 0 0 6px 0 !default;
2-
$list-h4-margin: 10px 0 5px 0 !default;
1+
$list-h3-margin: 0 0 0px 0 !default;
2+
$list-h4-margin: 3px 0 1px 0 !default;
33
$list-h4-font-weight: 400 !default;
4-
$list-header-line-height: 0.75em !default;
4+
$list-header-line-height: 1.2em !default;
55
$list-p-margin: 0 0 0 0 !default;
66
$list-p-line-height: 1.6em !default;
77

@@ -21,10 +21,10 @@ $list-item-primary-avatar-width: $baseline-grid * 5 !default;
2121
$list-item-primary-icon-width: $baseline-grid * 3 !default;
2222
$list-item-secondary-left-margin: $baseline-grid * 2 !default;
2323
$list-item-secondary-button-width: $baseline-grid * 6 !default;
24-
$list-item-text-padding-top: $baseline-grid * 2 !default;
25-
$list-item-text-padding-bottom: $baseline-grid * 2.5 !default;
2624
$list-item-inset-divider-offset: 12 * $baseline-grid !default;
2725
$list-item-height: 6 * $baseline-grid !default;
26+
$list-item-two-line-height: 9 * $baseline-grid !default;
27+
$list-item-three-line-height: 11 * $baseline-grid !default;
2828

2929
md-list {
3030
display: block;
@@ -169,10 +169,11 @@ md-list-item.md-2-line > .md-no-style,
169169
md-list-item.md-3-line,
170170
md-list-item.md-3-line > .md-no-style {
171171
align-items: flex-start;
172+
justify-content: center;
172173

173174
.md-list-item-text {
174175
flex: 1;
175-
padding: $baseline-grid * 2 0;
176+
margin: auto;
176177
text-overflow: ellipsis;
177178

178179
&.md-offset {
@@ -211,6 +212,7 @@ md-list-item.md-3-line > .md-no-style {
211212

212213
md-list-item.md-2-line,
213214
md-list-item.md-2-line > .md-no-style {
215+
height: $list-item-two-line-height;
214216
> .md-avatar:first-child {
215217
margin-top: $baseline-grid * 1.5;
216218
}
@@ -219,12 +221,12 @@ md-list-item.md-2-line > .md-no-style {
219221
}
220222
.md-list-item-text {
221223
flex: 1;
222-
padding-top: ($baseline-grid * 2.5) - 1;
223224
}
224225
}
225226

226227
md-list-item.md-3-line,
227228
md-list-item.md-3-line > .md-no-style {
229+
height: $list-item-three-line-height;
228230
> md-icon:first-child,
229231
> .md-avatar:first-child {
230232
margin-top: $baseline-grid * 2;

0 commit comments

Comments
 (0)