CKTIS / CSS
dominant-baseline — the dominant baseline
The dominant-baseline property selects the default baseline for aligning text and content participating in baseline alignment.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
dominant-baseline: auto | text-bottom | alphabetic | ideographic | middle | central | mathematical | hanging | text-top;dominant-baseline selects the default baseline within a box; it is not a general element-centering tool. It is inherited and initially auto. The draft covers inline boxes and SVG text content elements, among others; specification scope does not guarantee browser support.
auto means alphabetic in horizontal writing and vertical writing with text-orientation: sideways; in vertical mixed or upright text it means central. middle uses the x-height midpoint, whereas central uses the ideographic center; under upright, middle also uses central.
By contrast, alignment-baseline selects the baseline of the box being aligned. The example compares alphabetic and central in SVG. Glyph positions depend on font metrics; local verification is required.
Examples
<!doctype html>
<meta charset="utf-8">
<title>dominant-baseline</title>
<style>
text { font: 32px sans-serif; }
.alphabetic { dominant-baseline: alphabetic; }
.central { dominant-baseline: central; }
</style>
<svg xmlns="http://www.w3.org/2000/svg" width="360" height="120" viewBox="0 0 360 120">
<path d="M10 60H350" stroke="red" />
<text class="alphabetic" x="20" y="60">Abc</text>
<text class="central" x="190" y="60">Abc</text>
</svg>Result
A red horizontal guide at y=60. The left text uses its alphabetic baseline at the guide; the right text uses its central baseline. Exact glyph positions depend on font metrics.
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.