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

Re: [css-text-4] text-wrap:balance

From: Alan Stearns <stearns@adobe.com>
Date: Tue, 20 Jan 2015 21:18:38 +0000
To: Florian Rivoal <florian@rivoal.net>
CC: W3C Style <www-style@w3.org>
Message-ID: <9FF4B293-EA86-42D6-9D30-52B724EA2136@adobe.com>
On 1/20/15, 8:14 PM, "Florian Rivoal" <florian@rivoal.net> wrote:

>
>If you have a float:left (float:right in rtl text) or an initial-letter 
>making some but not all of the line boxes shorter, it seems to me that 
>the line length isn't what you'd want to equalize, but rather then 
>position of the right (left in rtl) end of the line.

You are correct. It could be the beginning of a line with a right float in 
LTR. So what we really want is to balance the block width taken up by line 
boxes *with* their float shortening taken into account. I’ll have to think 
a bit on how to express that precisely.

>
>>    (including lines that end in a forced break). 
>
>Maybe, but let's look into this a bit more.
>
>Could we apply this only wrapping is actually occurring at all?
>
>Consider this:
>div {text-wrap: balance;}
><div>
>  <h1>A fairly short line</h1>
>  <h1>A line just a bit longer</h1>
></div>
>
>With the spec as it is, you'd probably get
>A fairly
>short line
>A line just
>a bit longer

I hemmed and hawed a bit about adding another stipulation - lines only 
balance *if* doing so does not change the number of lines. So a single 
paragraph of:

Foo foo foo
foo foo foo
foo foo.

Would not change to:

Foo foo
foo foo
foo foo
foo foo.


Even though that gets you the best balancing result. For headlines and 
captions, I think this is what’s usually intended (balance the lines, but 
not if that makes an additional line). But I’ve heard some pushback on 
this idea.

Thanks,

Alan
Received on Tuesday, 20 January 2015 21:19:08 UTC

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