12

I got some text with

font-size:9px

But it is displaying correctly in Safari and Firefox but not with Mac/Chrome (V32).
Left is chrome [bad] / Right is Safari [correct]

enter image description here

I can see in the code inspector that my font is 9px but chrome switch to 10px :

enter image description here

I heard about the minimum font size in chrome and tried to disable the auto adjustment by following style but did not work.
Any idea?

* {
    -webkit-text-size-adjust: none;
}
6
  • I don't think it's possible to circumvent the user's preferences regarding minimum font size. I also don't think it's right to try and circumvent the user's preferences regarding minimum font size.
    – Mr Lister
    Jan 23, 2014 at 8:24
  • It is not a user's preference, I never put a minimum font size in my Chrome. This is Chrome's rules, because Safari and Firefox do not have this problem. Jan 27, 2014 at 8:06
  • 1
    Check out Chrome's settings, just in case. (menu) -> Settings -> Show Advanced Settings -> Web Content -> Customize Fonts -> Minimum Font Size.
    – Mr Lister
    Jan 27, 2014 at 10:07
  • Or if you like, Paramêtres -> Afficher les paramètres avancés… -> Personnaliser les polices -> Taille de police minimale.
    – Mr Lister
    Jan 27, 2014 at 10:08
  • OK my Chrome minimum font-size is 10px I see. I agree I should not try to circumvent user's preference but here it is not users pref, it is Chrome default values, I never asked 10px for minimum font-size. And for the discussion, firefox and safari do not have that limit... Jan 29, 2014 at 15:42

1 Answer 1

11

i can only tell WHY it's not working but this might help you to go looking for a different way to solve your problem.

from chrome version 28.0.1500.11 chrome doesn't support -webkit-text-size-adjust anymore. (changelist is here: http://trac.webkit.org/changeset/145168). and safari follows along. on newer mac os versions text-size-adjust is already gone too.

I have problems with it as well, since i've built a whole website on rem units to make it not only responsive but totally flexible. this worked pretty nice but all of a sudden everything is huge now. i'm working hard on a solution for this, but if anyone has an idea i didn't think of i'd appreciate that very much.

as soon as i find a solution i'll come back to let you know.

1
  • How did you solve the problem? I ran into the exact same thing after styling a website with all its containers with rem in order to be able to adjust the scaling by myself later. May 27, 2019 at 7:57

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.