By default, line-to-line varies widely across browsers and across different font families with different font sizes. Setting explicit line height addresses that.
This is due to differences in how the browser handles the sub-pixel positioning of the text. If the line height is 20 pixels and the font size is 15 pixels, then the text should be located 2.5 pixels from the top of the line. Gecko actually does this, and WebKit simply rounds the position to whole pixels. In some cases, two approaches give answers that differ in pixel.
In any case, make sure that your drive is an integer (that is, the line height minus the font size is even) will make the rendering more consistent if you really need it.
Try the following:
div h1 { -webkit-padding-before: 1px; }
Another possible solution:
@media screen and (-webkit-min-device-pixel-ratio:0) { div h1 { line-height:19px; } }
Tom sarduy
source share