[Webkit-unassigned] [Bug 155286] New: CSS line-height computes ok, renders incorrectly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 9 19:30:38 PST 2016


https://bugs.webkit.org/show_bug.cgi?id=155286

            Bug ID: 155286
           Summary: CSS line-height computes ok, renders incorrectly
    Classification: Unclassified
           Product: WebKit
           Version: Safari 9
          Hardware: Macintosh
                OS: OS X 10.10
            Status: NEW
          Severity: Major
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: tbredin at gmail.com

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!)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160310/4bf111f5/attachment.html>


More information about the webkit-unassigned mailing list