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

Re: [css3-text] Re: Orphan control in CSS

From: Peter Moulder <peter.moulder@monash.edu>
Date: Sun, 08 Jan 2012 13:38:16 +1100
To: www-style@w3.org
Message-id: <20120108023816.GA6729@bowman.infotech.monash.edu.au>
On Thu, Jan 05, 2012 at 08:55:32PM -0800, L. David Baron wrote:

> I tend to think that
> without whole-paragraph line break optimization, it's just going to
> make things look funny and authors aren't going to want to use it
> (perhaps with exceptions for very limited cases, like headings that
> will appear on either one or two lines).

The UA that I'm working on does do paragraph-at-a-time line breaking,
and already tries to avoid having a short last line.  For body text,
perhaps that's already enough, without having a property to control it.

(If there were a property to control the choice for body text, then I
 don't think that having a fixed "any length up to k is completely fine,
 and any length greater than k is completely unacceptable" control is the
 right way to go: having a short last line does have an aesthetic cost,
 but any shuffling of words to correct it will also have an aesthetic
 cost, sometimes greater than the cost of a short line.  E.g. for a
 justified body paragraph with only two lines, having a short last line
 is often the best available choice of line break.  So I think that any
 control property would need a more refined way of drawing the line
 between what corrections are worthwhile and what corrections aren't.)

I do agree that headings are a bit different, though: for a heading that
takes up two lines, it can look a bit strange even if the second line has
quite a decent length, like three words occupying a third of a line.

So something like a last-line-length:50% declaration might be useful for
headings (so long as it doesn't result in any other lines having a length
less than 50%, at least).

Another possible approach for headings: does CSS have anything that would
have the effect of making lines have roughly equal length?  That might be
useful for pull-quotes, or for use with text-align-last:justify.

Received on Sunday, 8 January 2012 03:39:10 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:09 UTC