FiFont
← Typography reference

Typography reference

Whitespace and line wrapping

White-space and wrapping rules determine how spaces and line breaks are treated in CSS. Unbreakable content can overflow a narrow container.

Try the visual comparison

Both blocks have a limited measure. The second requests nowrap and allows horizontal scrolling; the ordinary block can wrap at spaces. Forcing nowrap is not a fit guarantee.

Example A

Words need room to breathe
max-width:18ch;
white-space:normal;

Example B

Words need room to breathe
max-width:18ch;
white-space:nowrap;
overflow-x:auto;

These examples use browser/system fonts unless explicitly noted. Actual rendering and font feature support vary with your environment.

What to check in your project

Test a long translated button and confirm that essential text remains visible without inaccessible scrolling. Reserve nowrap for short tested labels and allow flexible text wrapping elsewhere.

Explore the related tool or guide →

Continue exploring