-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
bug(matLine): Using matLine within MatListItem squishes buttons #19809
Comments
Hi @wakonp I don't believe this is actually a bug. The <mat-list-item>
<span matLine>Do Something else</span>
<button matLine mat-raised-button color="accent">Foo is cool</button>
</mat-list-item> If you are satisfied can you please close the issue? Thanks! |
I am sorry but I think if that is correct, your documentation is wrong or there should be two types of matLine Directive. As you can see in your MatNavList, which is basically a MatList (correct me if am wrong with this statement), the matLine within an a Element is used to display the mat-icon-button at the end of the same line. I think the matLine directive has multiple purposes, which i also displayed here https://components-issue-4qxcyg.stackblitz.io:
I know how I can get arround the problem and I know it isn't really a bug, but I think it is inconsistend. |
* use `flex: auto` instead of `width: 100%` to allow `.mat-list-text` element to take up the available space
* use `flex: auto` instead of `width: 100%` to allow `.mat-list-text` element to take up the available space
Use `flex: auto` instead of `width: 100%` to size `.mat-list-text` elements. using `width: 100%` can lead to `.mat-list-text` sibling elements shrinking and having their content overflow.
Reproduction
Use StackBlitz to reproduce my issue: https://components-issue-raav17.stackblitz.io
Steps to reproduce:
Expected Behavior
In the StackBlitz Example the Button of the second MatListItem should get displayed as the first one.
Actual Behavior
In the StackBlitz Example the Button of the second MatListItem gets squished.
Environment
The text was updated successfully, but these errors were encountered: