Closed trotzig closed 8 years ago
Our internal problem (causing the subpixel positioning) was that we have the <body>
set to display: inline-block
. By setting vertical-align: top
we avoid subpixeling. Git history tells me we do this to fix modal scrolling on mobile (@janpaul123 do you remember? 😄).
I think we need to round the values before calculating width/height.
At Brigade, we have a few happo components that have a subpixel position from the top. This is unintentional, and I'm fixing that. Here's an example snapshot:
When I render that example in Firefox, I get this bounding rectangle:
When we pass back the rectangle bounds to the Ruby code, we round the numbers:
Notice how the subpixel positioning is no longer represented. This means that the snapshot in the above example is cut off too soon.