angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.32k stars 6.73k forks source link

md-icon in an md-menu-item doesn't apply colour from color property #5501

Closed mtpultz closed 6 years ago

mtpultz commented 7 years ago

Bug, feature request, or proposal:

Bug

What is the expected behavior?

md-icons within md-menu should use color property from theming

What is the current behavior?

md-icons in md-menus are always grey

What are the steps to reproduce?

Drop in a md-menu example from the docs and set color on the md-icons within the menu

Providing a Plunker (or similar) is the best way to get the team to see your issue. http://plnkr.co/edit/kqhWFT09iSogmBiWC20R?p=preview

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

Theming

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

Angular 4.2.4, Angular Material 2.0.0-beta.7, Windows 10

julianobrasil commented 7 years ago

You can use regular css color to paint it:

image

It's not exactly theming (e.g. color="primary") but hope it can help.

chetan-rathod commented 7 years ago

i also have prblm with this

mtpultz commented 7 years ago

Thanks @julianobrasil for the suggestion :) I'd recommend to anyone with this issue to use :host /deep/ .mat-icon { ... } to override styles instead of inlining so you keep styles in your Sass files. I just wanted to report the issue so it was visible.

mackelito commented 7 years ago

FYI /deep/ will be deprecated.. use ::ng-deep if possible. https://blog.angular.io/angular-4-3-now-available-8d57b57eb5a8

crisbeto commented 6 years ago

Should be fixed by https://github.com/angular/material2/commit/d0cb0771bd6d254dbd4f6cf4c35d503f14b9008b.

angular-automatic-lock-bot[bot] commented 5 years ago

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.