Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

md-icon inside md-button doesn't get text color #2551

Closed
quix-portal opened this issue Apr 24, 2015 · 7 comments
Closed

md-icon inside md-button doesn't get text color #2551

quix-portal opened this issue Apr 24, 2015 · 7 comments
Assignees
Milestone

Comments

@quix-portal
Copy link

When inserting an md-icon inside and md-button without md-raised class, to make a button with icon and text, the md-icon doesn't take the same color as text. Causing a very fuzzy button to display.

http://plnkr.co/edit/lbvK84KZHYYzLshoRxiB?p=preview

In the previous version (0.8.x) this worked.

@ThomasBurleson
Copy link
Contributor

Just use <md-icon md-svg-src="icon.svg" style=" color: rgb(244,67,54)"></md-icon>

@quix-portal
Copy link
Author

Why I should put inline style for color when the work should be done by the theme?
Using the md-raised or md-fab classes the md-icon color work is manageb by theme as I intend.
http://plnkr.co/edit/rEW16IwZpHRL4ChoYtem?p=preview
Then why without it should not in a normal button, forcing me to write inline style rules?

@ThomasBurleson
Copy link
Contributor

@davide-quix - Thanks for the follow-up question. While you can easily override and set the color, I agree that the icon should inherit the parent's color (unless explicitly overridden at the Icon or SVG levels).

@FrederickE
Copy link

FrederickE commented Aug 17, 2017

Please how can I change both md-icon inside md-button with the button text to have the same color when I hover on it. Please see example on plunker

@MustafaASK
Copy link

MustafaASK commented Jan 22, 2018

Hi FrederickE, Did you find solution for this problem? We are facing the same issue and have no solution as yet. :(.

@FrederickE
Copy link

@MustafaASK, yes I later figured it out and updated the CSS. Check the plunker

@MustafaASK
Copy link

Thanks a ton, FrederickE. This made my day!

@Splaktar Splaktar modified the milestones: 0.10.0, 0.9.0 Feb 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants