WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
Bug 158441
Misaligned inline-block due to fractional padding/margin/other vertical spacing
https://bugs.webkit.org/show_bug.cgi?id=158441
Summary
Misaligned inline-block due to fractional padding/margin/other vertical spacing
Han
Reported
2016-06-06 15:56:17 PDT
Tested on WebKit Nightly
r201711
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/602.1.36+ (KHTML, like Gecko) Version/9.1.1 Safari/601.6.17 # Example URL:
http://output.jsbin.com/tivuvov
# Steps to reproduce the problem: 1. Open
http://output.jsbin.com/tivuvov
2. See misaligned x and 2 # What is the expected behavior? x and 2 should always line up, because according to the CSS 2.1 spec: The baseline of an 'inline-block' is the baseline of its last line box in the normal flow
https://www.w3.org/TR/CSS21/visudet.html#propdef-vertical-align
Firefox 46 displays the correct behavior. # What went wrong? At certain fractional values of padding or margin, the x and 2 are misaligned, for example .3em. # Notes Safari 9.1.1 and Chrome 50 have the same problem, at I think all the same fractional values, but the misalignment is much more severe.
Attachments
Add attachment
proposed patch, testcase, etc.
Han
Comment 1
2016-06-06 15:57:02 PDT
Cross-ref:
https://bugs.chromium.org/p/chromium/issues/detail?id=617763
Han
Comment 2
2016-06-06 16:00:09 PDT
Before reporting this bug I did find an existing bug that appears similar, [Subpixel layout: Inline-block is offset from dominant baseline with em based padding](136332), but unlike this bug, 136332 has been fixed in Chrome, whereas this bug is *worse* in Chrome. [136332]:
https://bugs.webkit.org/show_bug.cgi?id=136332
Ahmad Saleem
Comment 3
2023-06-29 16:17:39 PDT
Took reduced test case from Chrome bug:
https://jsfiddle.net/vu71job4/show
^ I am able to reproduce using above in WebKit TOT (
265630@main
). Both Chrome Canary 117 and Firefox Nightly 116 have both 'x' (xx) with proper baseline and no issue in alignment.
Radar WebKit Bug Importer
Comment 4
2024-02-08 15:26:47 PST
<
rdar://problem/122587250
>
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