Components: [List] Possibility to align elements at end of item

Created on 8 Dec 2017  路  2Comments  路  Source: angular/components

Bug, feature request, or proposal:

feature request/proposal

What is the expected behavior?

Allow other items/classes than matListAvatar and matListIcon in a mat-list-item to be aligned to the left

What is the current behavior?

Looking at the html of list-item.html only the matListAvatar and matListIcon elements are aligned left.

What are the steps to reproduce?

StackBlitz starter (using latest npm release): https://stackblitz.com/edit/angular-material2-issue-x2ysgk?file=app/app.component.html

What is the use-case or motivation for changing an existing behavior?

I want to have another item to be aligned left, in my case a mat-checkbox
I can make it work with adding a matListIcon to the mat-checkbox, but that feels weird. Another proposal would be to make a generic term, like matListItemLeft or something.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

5.0.0

Is there anything else we should know?

P4 materialist feature needs discussion

Most helpful comment

Supporting an attribute like matListItemLeft would be easy, but I'm not sure if the name is that good.

Maybe something like matAlignStart. It's important to use start and end instead of left/right, because it needs to work within RTL mode as well.

All 2 comments

Supporting an attribute like matListItemLeft would be easy, but I'm not sure if the name is that good.

Maybe something like matAlignStart. It's important to use start and end instead of left/right, because it needs to work within RTL mode as well.

@DevVersion is there any reason you couldn't just use css to change this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jelbourn picture jelbourn  路  3Comments

dzrust picture dzrust  路  3Comments

constantinlucian picture constantinlucian  路  3Comments

3mp3ri0r picture 3mp3ri0r  路  3Comments

LoganDupont picture LoganDupont  路  3Comments