Syntax

white-space

Controlling how whitespace and line breaks within an element are handled.

Overview

ClassDeclarations
white-space:`value`white-space: `value`;
break-spaceswhite-space: break-spaces;
white-space:normalwhite-space: normal;
white-space:nowrapwhite-space: nowrap;
white-space:prewhite-space: pre;
white-space:pre-linewhite-space: pre-line;
white-space:pre-wrapwhite-space: pre-wrap;

Apply conditionally

Apply styles based on different states using selectors and conditional queries.

<div class="white-space:break-spaces:hover white-space:break-spaces@sm white-space:break-spaces@dark white-space:break-spaces@print">…</div>

  • Master UI


© 2025 Aoyue Design LLC.MIT License
Trademark Policy