Skip to content

[TextField] Make filled variant background / hover / focus states lighter  #12889

@jgoux

Description

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

Hello,

I find the new filled variant TextField's background too dark.

How were the different rgba values picked? (https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/FilledInput/FilledInput.js#L17)

I tried using a tool to calculate contrast ratio between the main background and the filled background on material design example and here are the difference between material-design examples and material-ui for each states :

State Material Design Spec Material-UI
Inactive 1.22 1.21
Activated 1.22 1.51
Focused 1.62 1.51
Hover 1.34 1.34
Error 1.22 1.51
Disabled 1.38 1.38

These numbers are based on a light theme.

We can see that according to the specs, there is a difference between the focused state and the activated state in term of background color (the activated one is the same color as the inactive one, which is lighter than the focused one). You can see the different states here, at the "States" section.

I suppose we should at least respect the "activated" state background color, so the contrast is better when typing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    design: materialThis is about Material Design, please involve a visual or UX designer in the processgood first issueGreat for first contributions. Enable to learn the contribution process.scope: text fieldChanges related to the text field.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions