NEW 155286
CSS line-height computes ok, renders incorrectly
https://bugs.webkit.org/show_bug.cgi?id=155286
Summary CSS line-height computes ok, renders incorrectly
tbredin
Reported 2016-03-09 19:30:38 PST
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
alan baradlay
Comment 1 2016-03-09 21:17:19 PST
I bet it's one of the integral flooring we do for lineboxes.
Myles C. Maxfield
Comment 2 2016-03-09 21:33:26 PST
(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
Comment 3 2016-03-19 15:46:55 PDT
Ahmad Saleem
Comment 4 2023-10-01 15:59:52 PDT
@Alan - Can we mark this as duplicate to your IFC work to enable 'fractional' line height?
Note You need to log in before you can comment on or make changes to this bug.