Home > Designing, Others > Unitless or not unitless?

Unitless or not unitless?

February 8th, 2017 Leave a comment Go to comments

Matt Smith:

You should always specify line-height as a unitless number (say this into the mirror five times). That way descendent elements that specify a different font size will inherit that number instead of a fixed line height.

Counterpoint in the comments by David Khourshid:

Unitless line heights are fine, but aren’t the only way to use it. If I want an exact, perfect vertical rhythm implemented in my stylesheets, I would absolutely use a line-height *with a unit* everywhere I declare a font-size.

I’m a unitless man myself, only because perfect vertical rhythm always feels like a fool’s errand to me.

Direct Link to ArticlePermalink


Unitless or not unitless? is a post from CSS-Tricks

Categories: Designing, Others Tags:
  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.