Inaccurate rendering of element border height on high dpi displays
Categories
(Core :: Layout, defect, P3)
Tracking
()
People
(Reporter: mail.eraserhead, Unassigned)
Details
Attachments
(6 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0
Steps to reproduce:
I have list items with this style:
line-height: 20px;
height: 20px;
padding: 5px;
border-bottom: 1px solid orange;
Resulting in an absolute height of 31px
Actual results:
On a normal dpi display these render correctly with 31px (see screenshot)
On a high dpi display these render as 30.66667px (see screenshots)
However if I remove the border and set height/line-height to 21px I get exactly 31px!
Since I'm trying to align a second column with translateY offset this drives me nuts! It's impossible. Chrome manages to do exactly 31px and thus has not problems aligning the 2nd column correctly.
Expected results:
The height should be exactly 31px on a high dpi diplay as well. Just as in Chrome!
I've run into the alignment issue several times before, but only today I realized that it only happens when using borders.
To make matters worse: I tried to work around the alignment issue by placing a 1px element at the bottom of each li element; look at the screenshot how inconsistently its height is rendered on a high dpi screen.
Updated•7 years ago
|
Updated•6 years ago
|
Updated•3 years ago
|
Description
•