Remove units from line-height values

Created on 29 March 2017, about 8 years ago
Updated 2 June 2025, 4 days ago

Problem/Motivation

The recommended method for defining line height is using a number value, referred to as a "unitless" line height. A number value can be any number, including a decimal-based number, as is used in the first code example on this page.

Unitless line heights are recommended due to the fact that child elements will inherit the raw number value, rather than the computed value. With this, child elements can compute their line heights based on their computed font size, rather than inheriting an arbitrary value from a parent that is more likely to need overriding.

From CSS Tricks - Line-height

For example, children of block elements will have a consistent line-height.

Proposed resolution

Remove units from line-height values.

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇺🇸United States james.mejia

Live updates comments and jobs are added and updated live.
  • CSS

    It involves the content or handling of Cascading Style Sheets.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024