Skip to the text

Docs Guides

Good practices

What to bind with a no-break space, what to leave to the browser, and what never to do. In the examples ~ stands for a no-break space (U+00A0), as in rules.md. Where a decision has a source read, the claim links to its record in sources.md; where it says “general knowledge” no source was read, and the advice is a judgement.

What to bind

A no-break space keeps two words on one line. Bind a pair when a line that ends or starts between them reads as a mistake. Each rule below does it, and each can be switched off by its id in disable.

What to leave to CSS

Some problems depend on where the line breaks, and a string rule cannot see that. Set them on the page.

All three are general knowledge here: no source in the registry covers them.

Column width

What never to do

A no-break space is a character

The engine writes U+00A0 into the text. It travels with the text: it is copied out, found by search in some tools and not in others, and screen readers read it as a space. It also stays where the text goes, which suits plain text, Markdown and email. A <span style="white-space: nowrap"> is markup instead: it stays on the page, and copying gives ordinary spaces. Which is better for search, copy, hyphenation and text-wrap: pretty has not been researched; the string engine keeps the no-break space, and the backlog holds the question. Nothing here promises a nowrap mode.

Something wrong or unclear here? Report an issue.