toolman
February 15, 2021, 2:19pm
1
Hi there,
I am trying to change the hover font size when users are using the autofill in webkit browsers.
For example, when a user hovers over an item in their autofill list, the font appears small than when it is selected.
Hover:
Selected:
Is there an attribute in CSS that will control this?
Currently I have:
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
-webkit-box-shadow: 0 0 0 30px #01abab inset !important;
color: #fff!important;
font-size: 18px;
}
input:-webkit-autofill {
-webkit-text-fill-color: #fff !important;
font-size: 18px!important
}
But it doesn’t seem to effect the hover.
Any ideas how I can change this?
Thanks!
Gandalf
February 15, 2021, 2:42pm
2
How is the font size going to change if you specify it as 18px in all cases?
2 Likes
toolman
February 15, 2021, 3:00pm
3
Hi,
Thanks for the reply.
I do not want the size to change, that is the problem I’m having
I would like it to remain 18px when it is hovered and also when it is selected in the field.
Problem could be that you’re missing the semicolon ; in your input:-webit-autofill {
on the last bit there. Try putting that in and see if it’s better.
@Gandalf good point, just saw your reply
PaulOB
February 15, 2021, 4:32pm
6
Are you talking about this autofill extension for Chrome or the autocomplete feature in the browser?
toolman
February 15, 2021, 5:15pm
7
Thanks for the reply.
Where is the missing semicolon? Maybe I am being silly but I can’t see it.
Hi @toolman it’s in this css bit
toolman
February 15, 2021, 5:30pm
9
Do you mean the last line?
I have changed it to this, but still no luck:
input:-webkit-autofill {
-webkit-text-fill-color: #fff !important;
font-size: 18px!important;
}
1 Like
PaulOB
February 15, 2021, 5:38pm
10
The last semicolon is optional and will make no difference.
Can you direct me to the autofill you are using?
1 Like
toolman
February 15, 2021, 6:12pm
11
It’s just the default one in Chrome that I am referring to
PaulOB
February 15, 2021, 7:30pm
12
Try this
input:-webkit-autofill::first-line {
font-size: 24px;
}
It’s not guaranteed to work everywhere.
1 Like
toolman
February 15, 2021, 9:05pm
13
Thank you, that worked perfectly
Can I Use says this about -webkit-autofill
:
1 Like
You’re welcome . Sure is.
system
Closed
May 18, 2021, 4:17am
17
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.