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

Input's color is hard-coded #12355

Closed
2 tasks done
FranBran opened this issue Aug 1, 2018 · 4 comments
Closed
2 tasks done

Input's color is hard-coded #12355

FranBran opened this issue Aug 1, 2018 · 4 comments
Labels
component: text field This is the name of the generic UI component, not the React module! good first issue Great for first contributions. Enable to learn the contribution process.

Comments

@FranBran
Copy link

FranBran commented Aug 1, 2018

The input's color cannot be themed. I would expect that the color defined in theme.palette.primary is used instead.

Line 66 of Input.js says: color: light ? 'rgba(0, 0, 0, 0.87)' : theme.palette.common.white

  • This is a v1.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Your Environment

Tech Version
Material-UI v1.4.2
React
browser
etc.
@itelo
Copy link
Contributor

itelo commented Aug 1, 2018

bottomLineColor should be available to be themed too.

const bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';

@itelo
Copy link
Contributor

itelo commented Aug 1, 2018

maybe add a color prop for input, like in button?

<Input color="primary" />

@oliviertassinari oliviertassinari added good first issue Great for first contributions. Enable to learn the contribution process. component: text field This is the name of the generic UI component, not the React module! labels Aug 1, 2018
@oliviertassinari
Copy link
Member

@FranBran I agree. Going through the history, it seems to be an old regression. This line can be simplified
https://github.com/mui-org/material-ui/blob/8013fdd36d40980ebb8f116f20e2843b781c0c39/packages/material-ui/src/Input/Input.js#L66
with:

-color: light ? 'rgba(0, 0, 0, 0.87)' : theme.palette.common.white, 
+color: theme.palette.text.primary, 

It's identical. Do you want to work on it? :)

bottomLineColor should be available to be themed too.

@itelo This is close to #12192. I think that it what I would encourage, using a CSS override or a theme.overrides.

maybe add a color prop for input, like in button?

@itelo #11644

@adeelibr
Copy link
Contributor

adeelibr commented Aug 9, 2018

Made a pull request #12458

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: text field This is the name of the generic UI component, not the React module! good first issue Great for first contributions. Enable to learn the contribution process.
Projects
None yet
Development

No branches or pull requests

4 participants