← Back to release summary

CSS 'lh' Length Unit

Category
CSS
Type
Chromium catches up
Status
Enabled by default (Chrome 109)
Intent stage
Shipped

Summary

The 'lh' unit adds support for expressing CSS lengths relative to the line-height. That is typically useful for specifying the height of an element to fit a whole number of lines. Example: textarea { height: 5lh }

Motivation

There is a wish/need to use the lh unit to size textareas to fit a given number of lines of text. See [1]. [1] https://github.com/w3c/csswg-drafts/issues/7542

Standards & signals

View on chromestatus.com