Whitespace

Syntax

Class
Properties
whitespace-normal
white-space: normal;
whitespace-nowrap
white-space: nowrap;
whitespace-pre
white-space: pre;
whitespace-pre-line
white-space: pre-line;
whitespace-pre-wrap
white-space: pre-wrap;
<div class="t1 w-256 bg-c-white shadow-4 p-16 whitespace-normal"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sit amet ullamcorper neque. </div>

Specification test cases

The test cases below are imported from the Turbo CSS specification. They have been executed upon loading this page.
Normal
t1 whitespace-normal
.t1.whitespace-normal { white-space: normal; }
Nowrap
t1 whitespace-nowrap
.t1.whitespace-nowrap { white-space: nowrap; }
Pre
t1 whitespace-pre
.t1.whitespace-pre { white-space: pre; }
Pre-line
t1 whitespace-pre-line
.t1.whitespace-pre-line { white-space: pre-line; }
Pre-wrap
t1 whitespace-pre-wrap
.t1.whitespace-pre-wrap { white-space: pre-wrap; }