0

Text with font-size: 1rem bigger then it should be:

enormous 1rem text

The problem reproduces only with all of this conditions:

  1. ios
  2. horizontal orientation
  3. some text outside of span tag

HTML code:

   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
        <head>
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <style>
                .t5 { font-size: 0.5rem;}
                .t6 { font-size: 0.6rem;}
                .t7 { font-size: 0.7rem;}
                .t8 { font-size: 0.8rem;}
                .t9 { font-size: 0.9rem;}
                .t10 { font-size: 1.0rem;}
                .t11 { font-size: 1.1rem;}
                .t12 { font-size: 1.2rem;}
                .t13 { font-size: 1.3rem;}
                .t14 { font-size: 1.4rem;}
                .t15 { font-size: 1.5rem;}
            </style>
        </head>
        <body>
            Some text<br />
            <span class="t5">Test text 0.5</span><br />
            <span class="t6">Test text 0.6</span><br />
            <span class="t7">Test text 0.7</span><br />
            <span class="t8">Test text 0.8</span><br />
            <span class="t9">Test text 0.9</span><br />
            <span class="t10">Test text 1.0</span><br />
            <span class="t11">Test text 1.1</span><br />
            <span class="t12">Test text 1.2</span><br />
            <span class="t13">Test text 1.3</span><br />
            <span class="t14">Test text 1.4</span><br />
            <span class="t15">Test text 1.5</span><br />
        </body>
    </html>
Temani Afif
  • 245,468
  • 26
  • 309
  • 415
Dima Pavlov
  • 115
  • 9

1 Answers1

0

You might be having this issue where iOS scaling the font to readable size. Refer to this answer where you need to set -webkit-text-size-adjust: none;

Ajit Panigrahi
  • 752
  • 10
  • 27