WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
304640
Larger font-size than expected on pre element when its content exceeds a given length
https://bugs.webkit.org/show_bug.cgi?id=304640
Summary
Larger font-size than expected on pre element when its content exceeds a give...
jacqueminv
Reported
2025-12-23 05:13:11 PST
Created
attachment 477829
[details]
Rendering bug visible on my iPhone running iOS 18.7.2 When I browse to
https://codepen.io/jacqueminv-the-builder/pen/JoKjKwm
with my iPhone running iOS 18.7.2, I see a first line with text size of 13px and then 2 subsequent lines with a text size of 20px (see screenshot). As the code suggests, no text-size CSS rule are specified on the first 2 lines. On the 3rd I tried to force the text-size to 13px. I would expect to see the same size on all the 3 elements. Note that on my Mac running Safari 18.6 (20621.3.11.11.3), the bug does not occur. This sort of construct, i.e. a pre element with any depth of span nesting, is common when using the hugo static site generator.
Attachments
Rendering bug visible on my iPhone running iOS 18.7.2
(385.42 KB, image/jpeg)
2025-12-23 05:13 PST
,
jacqueminv
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2025-12-23 10:07:31 PST
This is because of text auto-sizing. You can disable this with `-webkit-text-size-adjust: none`
Radar WebKit Bug Importer
Comment 2
2025-12-30 05:14:11 PST
<
rdar://problem/167333407
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug