Android Chrome ignoring -webkit-text-size-adjust:none property. Text is being scaled when zoomed out

23,016

Solution 1

Note that the -webkit-text-size-adjust property you mention is non-standard. Read more about it here.

Currently Chrome for Android scales text using font boosting and there's no way to disable it.

If you want a way to disable font boosting, please provide your use-case and log an issue via new.mcrbug.com.

Solution 2

Just discovered a workaround for this. Set a max-height on a parent element of the text to be much larger than it would ever appear. For example,

<p class="intro">
  This is some text that is appearing blown up 
  and ridiculous on Chrome Mobile.
</p>

p.intro {
  max-height: 5000em;
}

You can set the max-height on any parent element. It doesn't have to be the first parent. For example,

<footer class="primary">
  <p class="intro">
    This is some text that is appearing blown up 
    and ridiculous on Chrome Mobile.
  </p>
</footer>

footer.primary {
  max-height: 5000em;
}

Solution 3

<meta name="viewport" content="width=device-width, maximum-scale=1.0, user-scalable=yes"> in the <head> tag could disable zoom

Solution 4

I had the same issue with Firefox on Android.

The solution for me was to add the style "float: left;" to the div containing the problem text.

You might need to set the width of the div to the same as the parent (in pixels or 100%) to ensure it doesn't affect the rest of the divs.

See How to prevent mobile browser from resizing text

Solution 5

-webkit-text-size-adjust:none is so horrible!

I have poor eye site and constantly have my pages at 200% default zoom. With -webkit-text-size-adjust:none, I cannot read anything, and my only alternative is to use Firefox. It's my number one problem these days when browsing.

Too many sites use this, especially embedded Facebook comments on web pages. You should stop using it and create an interface that will work with any-sized font.

Share:
23,016
normmcgarry
Author by

normmcgarry

Global Technology Lead at Google

Updated on September 02, 2020

Comments

  • normmcgarry
    normmcgarry over 3 years

    Our client requested a website, but didn't want to pay for a mobile version. We still are making it work on mobile. When zoomed all the way out, Chrome on Android (4.0) is scaling a bunch of the text. We have tried setting the -webkit-text-size-adjust:none property, but it seems to be ignored and text is still being scaled up.

    Works fine on iOS.

    Any suggestions?