dominant-baseline

An SVG property that determines which baseline is used to align text. It's crucial for vertical alignment of text and icons within SVG graphics.

It is documented as part of the CSS Inline, Scalable Vector Graphics specification.

/* Usage Example */
text {
  /* Aligns SVG text to the middle of the container */
  dominant-baseline: middle;
}

/* Syntax */
dominant-baseline: auto;
dominant-baseline: text-bottom;
dominant-baseline: alphabetic;
dominant-baseline: ideographic;
dominant-baseline: middle;
dominant-baseline: central;
dominant-baseline: mathematical;
dominant-baseline: hanging;
dominant-baseline: text-top;

/* Global values */
dominant-baseline: inherit;
dominant-baseline: initial;
dominant-baseline: revert;
dominant-baseline: revert-layer;
dominant-baseline: unset;
Widely available Since 2020 96% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2020.

1+
1+
4+
79+
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