Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Font size changing upon page focus or field focus

This is only in Chrome I've noticed, not Firefox. I have noticed something about 2 weeks ago on a site I designed and also a very large client's site. I believe I've seen it elsewhere. when I initially load the page and before doing anything else (click, tab, shift-tab), the username and password are one size.

When I click or tab or otherwise focus on the page, the font size gets larger for both the username and password fields (but the field size itself doesn't change).

enter image description here enter image description here

I looked for some type of ::focus or ::active pseudo class but there is none. And both fields resize the font on page click or tab. Does anyone know why this is, and is it correctible (in Chrome) in any way?

like image 225
Oliver Williams Avatar asked Aug 23 '19 15:08

Oliver Williams


People also ask

What setting increases a page and font size?

To change your display in Windows, select Start > Settings > Accessibility > Text size. To make only the text on your screen larger, adjust the slider next to Text size. To make everything larger, including images and apps, select Display , and then choose an option from the drop-down menu next to Scale.

Which is the best option to adjust the font size so that we make the best use of the screen in HTML?

The font-size-adjust property gives you better control of the font size when the first selected font is not available. When a font is not available, the browser uses the second specified font. This could result in a big change for the font size. To prevent this, use the font-size-adjust property.

How do I fix my font settings?

On your device, open the Settings app. Search and select Font size. To change your preferred font size, move the slider left or right.


1 Answers

The following does the trick:

input:-webkit-autofill::first-line {
  font-family: 'Helvetica Neue', 'Arial', Arial, sans-serif !important;
  font-size: 16px !important;
}
like image 172
Julian Hollmann Avatar answered Oct 27 '22 10:10

Julian Hollmann