Re: [css-text] Preventing typographic orphans

I don’t think overly short first lines are a problem, especially given that all browsers currently wrap text greedily (something that should also be addressed IMO at some point. Greedy wrapping is terrible and there *are* linear time algorithms to achieve the same quality text wrapping as with Knuth-Plass. But that’s another discussion and I suspect the IE team would have a lot to say, since they’ve implemented better wrapping that is opt-in via a proprietary property IIRC).

~Lea

On Jan 8, 2015, at 04:08, Jonathan Kingston <jonathan@jooped.co.uk> wrote:

> 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:13:34 UTC