alignment-baseline

Controls how an inline-level element (usually SVG text) aligns itself with the vertical baseline of its parent. It's essentially the 'vertical-align' for SVG text.

It is documented as part of the CSS Inline specification.

/* Usage Example */
text {
  /* Aligns the text to its mathematical center */
  alignment-baseline: central;
}

/* Syntax */
alignment-baseline: baseline;
alignment-baseline: alphabetic;
alignment-baseline: ideographic;
alignment-baseline: middle;
alignment-baseline: central;
alignment-baseline: mathematical;
alignment-baseline: text-before-edge;
alignment-baseline: text-after-edge;

/* Global values */
alignment-baseline: inherit;
alignment-baseline: initial;
alignment-baseline: revert;
alignment-baseline: revert-layer;
alignment-baseline: unset;
Widely available Since 2015 94% global usage

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

1+
5.1+
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