W3C home > Mailing lists > Public > www-style@w3.org > January 2015

Re: [css-text] Preventing typographic orphans

From: Jirka Kosek <jirka@kosek.cz>
Date: Sun, 04 Jan 2015 23:11:41 +0100
Message-ID: <54A9BA9D.7010306@kosek.cz>
To: Michał Gołębiowski <m.goleb@gmail.com>, www-style list <www-style@w3.org>
On 3.1.2015 23:58, Michał Gołębiowski wrote:
> I'd b very happy if such a thing existed in CSS. In Poland it's considered
> an error to put single-letter words like 'w' ('in'), 'z' ('with') etc. at
> the end of the line. Clients often expect this to be fixed; in one project
> we had to read the text from the backend and manually replace all spaces
> after such words with non-breaking ones via JS on the client side. Such a
> thing doesn't influence performance in a good way so I'd be glad if we
> could just do it with plain CSS.

It would be difficult to make generic rule for this, especially for all
locales (in Czech we have similar rule which has roots in technical
limitations of lead type). The most common approach is to fix this issue
by inserting non-breaking space at server side, ideally just once when
content is stored/modified at the server.

				Jirka


-- 
------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka@kosek.cz      http://xmlguru.cz
------------------------------------------------------------------
     Professional XML and Web consulting and training services
DocBook/DITA customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
------------------------------------------------------------------
    Bringing you XML Prague conference    http://xmlprague.cz
------------------------------------------------------------------


Received on Sunday, 4 January 2015 22:12:28 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:56 UTC