<text-edge>

A value type used with 'text-box-edge' to define which lines of the font (like the top of capital letters, the x-height, or the baseline) should be used as the boundaries for trimming.

/* Usage Example */
.custom-trimmed-box {
  text-box-trim: both;
  /* Uses the x-height (top of lowercase 'x') and alphabetic baseline as the trim edges */
  text-box-edge: ex alphabetic;
}
Limited availability Since 2020 80% global usage

This feature is not Baseline because it does not work in some of the most widely-used browsers.

133+
18.2+
133+
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