Skip to content

Commit

Permalink
fix(list): Fixed list item icon padding
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 463008397
  • Loading branch information
material-web-copybara authored and copybara-github committed Jul 25, 2022
1 parent 57c2cfd commit 07aaa8a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions list/lib/icon/_list-item-icon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
direction: ltr;
height: 100%;
width: 100%;
padding-inline-start: 16px;

/* Support for all WebKit browsers. */
-webkit-font-smoothing: antialiased;
Expand Down
22 changes: 11 additions & 11 deletions list/lib/listitem/_list-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@
@include item-root;
}

.md3-list-item--with-leading-icon {
@include icon-item-root;
}

.md3-list-item__end {
padding-inline-start: 16px;
}

.md3-list-item--with-leading-thumbnail {
@include thumbnail-item-root;
}
Expand All @@ -41,36 +33,40 @@
}

@mixin item-root() {
align-items: flex-start;
align-items: center;
box-sizing: border-box;
display: flex;
padding-block-end: 12px;
padding-block-start: 12px;
padding-inline-end: 24px;
width: 100%;

.md3-list-item__start {
flex: 0 0 auto;
}

.md3-list-item__body {
box-sizing: border-box;
flex: 1 0 0;
padding-inline-start: 16px;
width: 100%;
}

.md3-list-item__end {
flex: 0 0 auto;
padding-inline-end: 24px;
}

.md3-list-item__label-text {
display: flex;
}

.md3-list-item__supporting-text {
display: flex;
display: block;
padding-block-start: 4px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
width: 100%;
}

.md3-list-item__supporting-text--multi-line {
Expand All @@ -80,6 +76,10 @@
overflow: hidden;
white-space: normal;
}

.md3-list-item__trailing-supporting-text {
padding-inline-start: 16px;
}
}

@mixin icon-item-root() {
Expand Down

0 comments on commit 07aaa8a

Please sign in to comment.