components icon indicating copy to clipboard operation
components copied to clipboard

Misaligned icon in nav-list

Open AsherFoster opened this issue 9 years ago • 4 comments

Bug, feature request, or proposal:

Bug

What is the expected behavior?

md-icon should be vertically centered relative to list item text

What is the current behavior?

md-icon is misaligned

What are the steps to reproduce?

md-nav-list
  md-list-item
    md-icon[md-list-avatar]
    p[md-line]

http://plnkr.co/edit/qAVB6mOYNf4p8yxtRSQX?p=preview Screenshot

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

Devs shouldn't have to modify CSS to achieve what should be the default behaviour of this list

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

2.0.0-beta.1. Tested on Chrome 56.

Is there anything else we should know?

Commenting out the height: 40px line in devtools seemed to resolve the problem, but this may break alignment for multiline items

AsherFoster avatar Feb 09 '17 04:02 AsherFoster

I used <md-icon md-list-icon> instead of <md-icon md-list-avatar>, which seems to work. I think the documentation is off here.

joostvandoremalen avatar Feb 09 '17 11:02 joostvandoremalen

https://github.com/angular/material2/issues/2650

ocarreterom avatar Feb 09 '17 13:02 ocarreterom

md-list-icon is intended to be used with icons, while md-list-avatar is really intended for image tags. They have different default sizes, so they're not really interchangeable.

This is really unclear in the documentation, though, so I've created this PR to fix that.

kara avatar Feb 09 '17 18:02 kara

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.