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

fix: prevent chrome default autocomplete colors #2247

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
color-scheme: dark;
/* hack to remove autocomplete colors in chrome, as they conflict with scale dark/light mode styles https://stackoverflow.com/a/68240841 */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not super happy about this haha… do you think we could try testing with adding color-scheme: light dark; globally in :root (in the global CSS file) and remove this color-scheme rules for the Text Field only?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey I did test that already in the old PR for this same issue #2191 (comment) , but just adding color-scheme: light dark; to the global css does not fix the issue as far as i can see... (these changes would still be needed for it to work https://github.com/telekom/scale/pull/2191/files)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i mean, it seems like just adding color-scheme: light dark; by itself would not fix the issue

transition: background-color 0s 600000s, color 0s 600000s;
}

@media screen and (forced-colors: active), (-ms-high-contrast: active) {
Expand Down
Loading