Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

md-avatar-icon inside a clickable md-list-item #5554

Closed
tjlav5 opened this issue Nov 4, 2015 · 5 comments
Closed

md-avatar-icon inside a clickable md-list-item #5554

tjlav5 opened this issue Nov 4, 2015 · 5 comments
Assignees
Labels
needs: review This PR is waiting on review from the team P1: urgent Urgent issues that should be addressed in the next minor or patch release.
Milestone

Comments

@tjlav5
Copy link

tjlav5 commented Nov 4, 2015

It seems that the css for the md-avatar-icon is a bit too specific.

md-list-item > .md-avatar-icon {
    background-color: '{{foreground-3}}';
    color: '{{background-color}}';
}

When adding a click fn to the containing md-list-item, the new structure becomes:

md-list-item
-- button
----.md-list-item-inner
------.md-avatar-icon

Is there any reason to not have an md-avatar-icon inside a clickable list-item? Or is it just an omission? If the later I can submit a quick PR.

Something along these lines would fix my use case:

md-list-item > .md-avatar-icon, .md-list-item-inner > .md-avatar-icon

OR

md-list-item .md-avatar-icon

Cheers

@programmist
Copy link
Contributor

@tjlav5 - Please provide a CodePen or Plunkr that demonstrates this issue. Here are some starter demo templates that you can use/fork:

@tjlav5
Copy link
Author

tjlav5 commented Nov 17, 2015

An md-avatar-icon child of a md-list-item gets a simple theme: color & background-color.

md-list-item > .md-avatar-icon {

CodePen: http://codepen.io/anon/pen/gaEOvo
The first md-list-item does not have an ng-click attr, the second does

Once the md-list-item has a click event handler associated with it (ng-click), a button and md-list-item-inner come into play. When that happens, the theme for the md-avatar-icon no longer applies the colors...

@programmist
Copy link
Contributor

@tjlav5: I've applied the style change and have a working demo here:
http://codepen.io/programmist/pen/ZQYZay

Please verify that it's working for you.

@tjlav5
Copy link
Author

tjlav5 commented Dec 19, 2015

@programmist Yep, that did the trick.

@ThomasBurleson ThomasBurleson modified the milestones: 1.0-rc8, 1.1.0, Backlog Jan 5, 2016
@ThomasBurleson ThomasBurleson modified the milestones: 1.0.3, Backlog Jan 7, 2016
@ThomasBurleson ThomasBurleson modified the milestones: 1.0.4, 1.0.3 Jan 7, 2016
@ThomasBurleson ThomasBurleson added the P1: urgent Urgent issues that should be addressed in the next minor or patch release. label Jan 15, 2016
@ThomasBurleson ThomasBurleson modified the milestones: 1.0.4, Backlog Jan 15, 2016
@ThomasBurleson ThomasBurleson modified the milestones: Backlog, 1.0.4, 1.0.5 Jan 25, 2016
@programmist
Copy link
Contributor

This has been waiting on PR #6181.

@programmist programmist added in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs needs: review This PR is waiting on review from the team labels Feb 1, 2016
ErinCoughlan pushed a commit to ErinCoughlan/material that referenced this issue Feb 9, 2016
@ThomasBurleson ThomasBurleson removed the in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs label Apr 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: review This PR is waiting on review from the team P1: urgent Urgent issues that should be addressed in the next minor or patch release.
Projects
None yet
Development

No branches or pull requests

3 participants