text-wrap-mode

A newer way to define if text should wrap to the next line or not. This is essentially a more modern version of the 'white-space' property for wrapping.

It is documented as part of the CSS Text specification.

/* Usage Example */
.hero-title {
  /* Forces the text to stay on a single line and never wrap */
  text-wrap-mode: nowrap;
}

/* Syntax */
text-wrap-mode: wrap;
text-wrap-mode: nowrap;

/* Global values */
text-wrap-mode: inherit;
text-wrap-mode: initial;
text-wrap-mode: revert;
text-wrap-mode: revert-layer;
text-wrap-mode: unset;
Newly available Since 2024 84% global usage

Since 2024 this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

130+
124+
17.4+
130+
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