11
votes

I've got an issue with cursor colour after Chrome autocomplete.

I have input fields (email and password) with white colour, both text and cursor are white in case when fields are empty and user types text. But when chrome uses autocomplete for this fields text is still white, but cursor is black when user types in fields cursor became white, when selects from chrome autocomplete list it is black. Text colour in chrome autocomplete list is black looks like it effects input cursor.

I've tried next styles for input but no effect.

input {
  color: white !important;
}

input:-webkit-autofill {
  -webkit-text-fill-color: white !important;
  color: white !important;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:active,
input:-webkit-autofill:focus {
  color: white !important;
 -webkit-text-fill-color: white !important;
}

So, can I fix it somehow?

Thanks for suggestions!

1

1 Answers

11
votes

caret-color works for me:

input:-webkit-autofill {
  caret-color: white;
}