Closed oliviertassinari closed 1 year ago
With the current implementation, the way to fix this with CSS is to use :has()
but it will be years until we can use it.
What we can do now is change the text color when autofill is detected.
@siriwatknp What prevents us to fix this like in Material UI?
@siriwatknp What prevents us to fix this like in Material UI?
When you say "like in Material UI", which part do you mean? is it the animation (mui-auto-fill
)?
I try a different approach using CSS variables, what do you think? https://github.com/mui/material-ui/pull/35056
Duplicates
Latest version
Current behavior 😯
The autofill UI state is indistinguishable:
This prevents me as an end-user to know if, for example, the password that is provided was auto-filled, hence likely correct, or if I changed one character by mistake that would make the sign-in fail.
Expected behavior 🤔
The autofill UI state is distinguishable:
Steps to reproduce 🕹
Steps:
Context 🔦
There was a past attempt at this problem in #17863. Now, I'm not so sure it's still the best solution to the problem. We might want to update Material UI to rely on the
color-scheme
CSS property. I'm not sure. This problem also surfaced in https://github.com/mui/mui-toolpad/pull/809#issuecomment-1220307463.Your environment 🌎
See the codesandbox