With line-height: 1 the descenders on the font will overflow the automatic height.
Here is a sample:
body{
line-height: 1;
font-size: 50px;
}
div{
overflow: auto;
}
<html>
<body>
<div>
<a href="">gqpy</a>
</div
</body>
</html>
I could use How to calculate descender height in javascript? to calculate the height and add padding manually, but I would like to use a pure CSS solution if it's possible.