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.
Syntax
/* 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;
dominant-baseline Browser support
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+