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

Re: [css-text] Preventing typographic orphans

From: Jonathan Kingston <jonathan@jooped.co.uk>
Date: Thu, 8 Jan 2015 02:08:37 +0000
Message-ID: <CA+EVJMV9cJWQ66MDHfFkR=MSw20Hiq0+kwaQsoAJkW7U8uN0Zw@mail.gmail.com>
To: Lea Verou <lea@verou.me>
Cc: www-style list <www-style@w3.org>, Zack Weinberg <zackw@panix.com>, Glenn Adams <glenn@skynav.com>
Perhaps like the 'orphans' and 'widows' currently in place for print css
allow the same behaviour with simpler: 'line-orphans' and 'line-widows'.

This would allow you to specify both to 3 and in a case of less than 6
would wrap as normal.
On 8 Jan 2015 02:02, "Lea Verou" <lea@verou.me> wrote:

> On Jan 8, 2015, at 03:32, Jonathan Kingston <jonathan@jooped.co.uk> wrote:
>
> > Control over sentence orphans would be brilliant, if for example the
> following could be controlled:
> >
> > p {
> >   line-min-orphans: 3;
> > }
> >
> > <p>
> > Hello here is some sample text. Here is a new sentence. Here is another
> > longer sentence that spans multiple lines that is long etc etc.
> > </p>
> >
> > May currently look this on a small screen:
> > Hello here is some sample text. Here
> > is a new sentence. Here is another
> > longer sentence that spans multiple
> > lines that is long etc etc.
> >
> > Would output:
> > Hello here is some sample text.
> > Here is a new sentence.
> > Here is another longer sentence
> > that spans multiple lines
> > that is long etc etc.
> >
> > Support for more than just screen and print would be useful for this.
>
> It might be useful to discuss what would happen in the case of a paragraph
> with line-min-orphans: N; and a content of < 2N words. E.g. if the text is
> "This is a cat.", I most definitely wouldn’t want it to wrap like this to
> avoid orphans:
>
> This
> is a cat.
>
> ~Lea
Received on Thursday, 8 January 2015 02:09:11 UTC

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