The line-height-step CSS property defines the step units for line box heights. When the step unit is positive, line box heights are rounded up to the closest multiple of the unit. Negative values are invalid.

/* Point values */
line-height-step: 18pt;

Value not found in DB!

Syntax

The line-height-step property is specified as any one of the following:

Values

<length>
The specified <length> is used in the calculation of the line box height step.

Formal syntax

Syntax not found in DB!

Examples

In the following example, the height of line box in each paragraph is rounded up to the step unit. The line box in <h1> does not fit into one step unit and thus occupies two, but it is still centered within the two step unit.

:root {
  font-size: 12pt;
  --my-grid: 18pt;
  line-height-step: var(--my-grid);
}
h1 {
  font-size: 20pt;
  margin-top: calc(2 * var(--my-grid));
}

The result of these rules is shown below in the following screenshot:

How the line-height-step property affects the appearance of text.

Specifications

Specification Status Comment
CSS Rhythmic Sizing
The definition of 'line-height-step' in that specification.
Working Draft Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic support
Experimental
Chrome Full support 60
Disabled
Full support 60
Disabled
Disabled From version 60: this feature is behind the --enable-blink-features=CSSSnapSize runtime flag.
Edge ? Firefox ? IE ? Opera Full support 47
Disabled
Full support 47
Disabled
Disabled From version 47: this feature is behind the --enable-blink-features=CSSSnapSize runtime flag.
Safari ? WebView Android Full support 60
Disabled
Full support 60
Disabled
Disabled From version 60: this feature is behind the --enable-blink-features=CSSSnapSize runtime flag.
Chrome Android Full support 60
Disabled
Full support 60
Disabled
Disabled From version 60: this feature is behind the --enable-blink-features=CSSSnapSize runtime flag.
Edge Mobile ? Firefox Android ? Opera Android Full support 47
Disabled
Full support 47
Disabled
Disabled From version 47: this feature is behind the --enable-blink-features=CSSSnapSize runtime flag.
Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
User must explicitly enable this feature.
User must explicitly enable this feature.

See also

Document Tags and Contributors

Last updated by: mfuji09,