Run Ragged

8 Comments

Comments are ordered by helpfulness, as indicated by you. Help us pick out the gems and discourage asshattery by voting on notable comments.

Got something to add? You can leave a comment below.

  1. Jon Tan

    Great stuff, Mark, and thanks for the mention! I’d like to suggest that the numeric entity for a non break space ( ) is used if the markup needs to be parsed into XML/RSS/ATOM because nbsp doesn’t exist in XML as far as I remember.

  2. Ben Barber

    I’m glad you mentioned hyphens, though they probably need an entire post to cover them adequately. I experimented with @hyphens:auto@, but it hyphenated too aggressively and made the content challenging to read.

    If I was to do it again, I think I’d set @hyphens:manual@ and then take an approach similar to Ragadjust — add @­@ to select words as necessary.

  3. Anatol Broder

    I use similar rules for writing prose in Russian and German for years. In these languages words can be very long. An important addition is the usage of handcrafted @­@. Please don’t use the CSS automation for hyphenation. It’s not reliable.

    For those who write in Markdown, I recommend to use the middle dot (·) for setting @ @ and the tilde (~) or the obulus (÷) for @­@. The replacement should happen in the post-markdown process. Redcarpet may be the first Markdown renderer with native support for this feature.

    Mark, I’m curious, why don’t you use the rules in your own website?

    This comment contains non-break spaces.

  4. Josiah Sprague

    Very interesting and simple solution. I do think there is a lot of value in getting typography right, but I wonder if having the browser handle it via JavaScript has marginal gains for typography, at the price of some speed, usability or other front-end concerns. Why not have a script that handles this within the CMS or on the server, since it only needs to happen once, and not every time the page is rendered.

Impress us

Be friendly / use Textile