Skip to content

Commit

Permalink
[GEN-1824]: fix styles for autocompleted inputs (#1885)
Browse files Browse the repository at this point in the history
This pull request includes changes to the
`frontend/webapp/app/globals.css` file to address browser autofill
styling issues. The most important changes include overriding the
default browser styles for autofill to ensure a consistent user
experience.

Styling improvements:

*
[`frontend/webapp/app/globals.css`](diffhunk://#diff-0ad5feab59ca691369930750cde64b75419ddd0dbe0e567e069550de11c4b051R10-R26):
Added styles to override the browser `:-webkit-autofill` default style
declarations by delaying the browser styles for 50000s (13.8 hours),
ensuring that the user will not see the browser-applied styles.
  • Loading branch information
BenElferink authored Nov 28, 2024
1 parent 4b9057c commit 92ea40f
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion frontend/webapp/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,21 @@
* {
scrollbar-color: black transparent;
scrollbar-width: thin;
}
}

/*
The input styles below are to override the browser ":-webkit-autofill" default style declarations.
The issue is when someone autocompletes an input field, the browser will apply its own styles (and the browser applies "!important" preventing direct overrides).
With the following, we're able to delay the browser styles to be applied for 50000s (13.8 hours), so the user will not see the browser styles applied.
*/

input {
all: unset;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
transition: all 50000s ease-in-out 0s;
}

0 comments on commit 92ea40f

Please sign in to comment.