coderef

baseline-sourceLimited availability

The baseline-source CSS property controls how inline-level boxes with multiple lines of text are aligned with the surrounding text. By default, which typographic baseline is used depends on the display property value.

Not yet supported in all major browsers — check the table and provide a fallback.

Browser support

DesktopChrome
1–110Not supported
111+Supportedsince Mar 7, 2023
Current: 155
Edge
12–110Not supported
111+Supportedsince Mar 13, 2023
Current: 154
Firefox
1–114Not supported
115+Supportedsince Jul 4, 2023
Current: 157
Safari
✕Not supportedup to 27
Current: 27
MobileChrome Android
18–110Not supported
111+Supportedsince Mar 7, 2023
Current: 155
Firefox Android
4–114Not supported
115+Supportedsince Jul 4, 2023
Current: 157
Safari iOS
✕Not supportedup to 27
Current: 27

How to use

Not supported in Safari, Safari iOS. Use feature detection below and provide a fallback (or a polyfill) for those browsers.

Example

Full syntax and examples are on MDN: baseline-source.

Feature detection

CSS · check before using
@supports (baseline-source: initial) {
  /* styles that rely on baseline-source */
}

/* or in JavaScript */
if (CSS.supports("baseline-source", "initial")) {
  // use it
}

Sub-features

Support for each part of the feature (4). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
baseline-source111111115✕111115✕
baseline-source.auto111111115✕111115✕
baseline-source.first111111115✕111115✕
baseline-source.last111111115✕111115✕