I am having difficult time setting the input font-size when input is autofilled in chrome and edge. I am able to get the desired color and border, but not the font-size. Also line-height seems to change to the value of desired font-size. Correct font-size is applied when I click on the page content. Suprisingly everything works fine in firefox.
Chrome version: 97.0.4692.71
Edge version: 96.0.1054.62
Firefox version: 95.0.2
CSS rule I am using at the moment to achive that:
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
border: 1px solid green;
-webkit-text-fill-color: green;
font-size: 24px !important;
}
Thanks!