text-box
The shorthand property for 'text-box-trim' and 'text-box-edge'. It provides a concise way to control how a text box's vertical space is calculated and trimmed.
Quick example
h2 {
/* Trims both sides of the text box using capital letters and the baseline as bounds */
text-box: trim-both cap alphabetic;
} Quick facts
Initial value
normalInherited
No
Applies to
block containers and inline boxes
Animation type
discrete
Values
normaltext-box-trimtext-box-edge text-box Browser Support
Limited availability 80% global usage
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Not ready for production without a fallback.
133+
18.2+
133+