Answer the question
In order to leave comments, you need to log in
How to remove mysterious indents from h1...h6?
Even after the reset, the headers still have unwanted white spaces at the top and bottom. The larger the font size, the better it is visible. They belong exactly to the header, you can make sure in the inspector. Example
Codepen
Requires that the topmost point of the highest letter touches the parent block.
Adding line-height: 0.7em to h1 helps to get rid of them approximately, but
1. a few pixels still remain. you can continue to pick it up with your hands, but...
2. the solution is opaque
3. potential problems with different families, sizes, font units
4. it's hard to get into pixel perfect
Actually, where did they come from and how to overcome them. Possibly with operations in sass
Answer the question
In order to leave comments, you need to log in
There is no solution and there won't be, that's how font rendering works.
Adjust the line-height once and don't worry, you won't get PP here
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question