CSS Line-height property – no unit required

Ok I admit this was news to me. Blame the Visibone chart I clutch in my little fist when using this attribute every now and again. But the line-height property does not require and in most cases should not use a unit with the value.

Eric Meyer explains it in his post, Unitless Line-heights.

General gist, stop doing this: line-height: 1em or line-height: 20px and start doing line-height: 1.

One thought on “CSS Line-height property – no unit required”

Comments are closed.