CKTIS / CSS
text-wrap-mode — enabling text wrapping
The text-wrap-mode property determines whether text may wrap at allowed opportunities or break only at forced line breaks.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
text-wrap-mode: wrap | nowrap;text-wrap-mode accepts wrap or nowrap. Its initial value is wrap, and it is inherited. wrap permits wrapping at allowed opportunities but does not guarantee that every word fits.
nowrap disables soft wrapping, not forced line breaks. Content that is too wide overflows its container; the property alone does not add an ellipsis.
text-wrap-style selects the wrapping approach, whereas text-wrap-mode decides whether wrapping is allowed. The text-wrap and white-space shorthands can reset this property, so declaration order matters. It does not control white-space collapsing.
Examples
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>text-wrap-mode</title>
<style>
.sample {
width: 4ch;
font: 20px/1 monospace;
white-space: normal;
border: 1px solid;
margin-bottom: 12px;
}
.wrap { text-wrap-mode: wrap; }
.nowrap { text-wrap-mode: nowrap; }
</style>
<div class="sample wrap">AAA BBB</div>
<div class="sample nowrap">AAA BBB</div>
</html>Result
.wrap: AAA BBB .nowrap: AAA BBB
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.