16

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 Answer 1

22

caret-color works for me:

input:-webkit-autofill {
  caret-color: white;
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.