Bug 155286
Summary: | CSS line-height computes ok, renders incorrectly | ||
---|---|---|---|
Product: | WebKit | Reporter: | tbredin |
Component: | CSS | Assignee: | alan baradlay <zalan> |
Status: | NEW | ||
Severity: | Major | CC: | ahmad.saleem792, mmaxfield, zalan |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 9 | ||
Hardware: | Mac | ||
OS: | OS X 10.10 | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=261212 |
tbredin
Unitless line heights appear to have an issue where the size of the element rendered to screen sometimes renders at a different size to the computed line-height. Take the following CSS:
html {
font-size: 125%; // 20px computed size
}
p {
font-size: 1.5rem; // 30px computed size
line-height: 1.33333333333; // 40px computed size
}
Here's a codepen that demonstrates the issue: http://codepen.io/tbredin/pen/ONNGmY
In the inspector this reports the computed line-height as 40px. However the element only takes up 39px of space in the browser.
Over long distances this can add up to a big error, is pretty severe (for example; vertical rhythm systems across multiple columns are busted really badly!)
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
alan baradlay
I bet it's one of the integral flooring we do for lineboxes.
Myles C. Maxfield
(In reply to comment #1)
> I bet it's one of the integral flooring we do for lineboxes.
Yeah, this is because of the flooring. It would be great to get rid of that, but the compat risk worries me.
alan baradlay
rdar://problem/21713525
Ahmad Saleem
@Alan - Can we mark this as duplicate to your IFC work to enable 'fractional' line height?