-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't Use a Fixed Line Height #96
Comments
Thanks for the article! @AleksandrHovhannisyan However, I cannot understand the difference between absolute LH and relative LH. Furthermore, I actually prefer the absolute value, although I kept seeing people recommending the unit-less approach. Here are the reasons:
What do you think? |
This is a really good question! And I think you're right. Practically speaking, there's no difference between unitless line height and absolute line height since you get the same result either way, and you'll have to change the unitless line height for each font size anyway. Absolute values are definitely easier to reason about. I would probably use
Right, exactly. Unitless line height creates the false illusion that your line height will scale well for all font sizes, but we saw that this isn't the case since it leads to exaggerated spacing at very large font sizes. If you end up having to change the line height at every step anyway, then you may as well just use absolute line heights in the first place. When I have time, I may go back and update the post to clarify this a bit better. |
Thanks for your reply. Yes Actually I was always feeling confused about this problem because unit-less is advocated everywhere. The post and the conversation really helps! Let me know once you updated your post. : ) |
@iam-yan Done! See this new section: Absolute vs. Unitless Line Height: Which Should You Use?. I also updated the code samples and my site's own CSS. |
Good job~ |
No description provided.
The text was updated successfully, but these errors were encountered: