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.

Quick example

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

Quick facts

Initial value
auto
Inherited
No
Applies to
inline-level boxes
Animation type
discrete

Values

autofirstlast

baseline-source Browser Support

Limited availability 78% global usage

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

Not ready for production without a fallback.

111+
115+
111+
ESC