-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(list): allow avatar in selection list options #10316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/lib/list/list.scss
Outdated
// Reversed content is mainly used by the MatSelectionList for displaying the checkbox at the | ||
// end of the list option. If avatar is the 4th item, it means the list-item has both checkbox | ||
// and avatar-icon. There needs to be a padding for the mat-list-avatar on the end-side. | ||
.mat-list-item-content-reverse .mat-list-avatar:nth-child(4) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These selectors seem brittle. If the user has a display: none
element somewhere inbetween, it'll throw everything off. You could work around it by setting a class on the avatar instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added padding to .mat-list-text
instead and removed the :not(:nth-child(2))
since it's hard to override.
src/lib/list/list.scss
Outdated
.mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)) { | ||
padding-left: 0; | ||
padding-right: $mat-list-side-padding; | ||
.mat-list-item-content-reverse .mat-list-text { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why delete the comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accidentally deleted. Reverted the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@tinayuangao needs rebase, reapply |
Can this be merged? Looks like the Travis CI build needs to be retried and the merge conflicts fixed. |
It's been a while. Can this be rebased and merged? Thanks! |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Closes #10192