Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

md-input input element color not affected by parent. #534

Closed
DennisSmolek opened this issue May 26, 2016 · 4 comments
Closed

md-input input element color not affected by parent. #534

DennisSmolek opened this issue May 26, 2016 · 4 comments

Comments

@DennisSmolek
Copy link

DennisSmolek commented May 26, 2016

Bug:

When using template syntax to change the md-input text color with [style.color]="whatever" it does not affect the resulting <input> element.

I found this when working on a color picker element and I tried changing the input's text color to match the chosen color.

What is the expected behavior?

The input element should change its text color/properties based on changes to md-input

What is the current behavior?

Default values (like Plunker/Chrome's user agent stylesheet's initial value) override the div's color change.

What are the steps to reproduce?

<md-input   [style.color]="color2"   [value]="color2"></md-input>

Link to in action and a fix.
https://plnkr.co/edit/epsQlY?p=preview

To fix it the .md-input-element class needs the property: color:inherit

With this I assume there is a few other css properties that need to be checked..

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

Angular: RC.1 Material: Latest.. Only tested on Mac/Chrome at the moment but Its an easy fix..

@DennisSmolek
Copy link
Author

Another related inheritance issue: #277

@jelbourn jelbourn changed the title md-input input element color not effected by parent. md-input input element color not affected by parent. May 26, 2016
@jelbourn
Copy link
Member

jelbourn commented Jun 2, 2016

@hansl I'd lean towards this being the user sets via css on the .md-input-element. Thoughts?

@jelbourn
Copy link
Member

I believe this was fixed in #1262

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants