baseline-source

Determines which line box's baseline is used as the reference for an element with multiple lines. For example, you can choose to align an inline-block based on its first line of text or its last line.

It is documented as part of the CSS Inline specification.

/* Usage Example */
.inline-component {
  display: inline-block;
  /* Aligns the component using the baseline of its last line of text */
  baseline-source: last;
}

/* Syntax */
baseline-source: auto;
baseline-source: first;
baseline-source: last;

/* Global values */
baseline-source: inherit;
baseline-source: initial;
baseline-source: revert;
baseline-source: revert-layer;
baseline-source: unset;
Limited availability Since 2020 78% global usage

This feature is not Baseline because it does not work in some of the most widely-used browsers.

111+
115+
111+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC