MudBlazor / MudBlazor/ThemeManager
Any input while in dark mode UI breaks when autofilled
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 288
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Description
Basically, when you autofill an input it will change the background to white for that input while in dark mode.
I added the following code to my style.css and it fixed the issue, but just wanted to share. I am not sure if I used the right variables, but it was tested with default theme and dark theme.
Keep in mind this will only fix single line autocomplete, since I am using 50px. Also, maybe use a different color so the user knows what fields were autofilled.
input:-webkit-autofill {
background-color: transparent !important;
-webkit-box-shadow: 0 0 0 50px var(--mud-palette-surface) inset;
-webkit-text-fill-color: var(--mud-palette-text-primary) !important;
}
//*** Credit to the original author who suggested that using the box shadow would fix the problem.
https://stackoverflow.com/questions/58263122/google-chrome-autofill-background-color-change
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with style.css and reproduce the reported autofill behavior in the default and dark themes using a single-line input. Compare the autofilled field with the surrounding dark-mode UI and verify that its background and text remain readable without affecting normal inputs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100