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

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

From: Peter Moulder <pjrm@mail.internode.on.net>
Date: Fri, 6 Feb 2015 20:27:51 +1100
To: Alan Stearns <stearns@adobe.com>
Cc: www-style@w3.org
Message-ID: <20150206092751.GA13570@mail.internode.on.net>
On Fri, Feb 06, 2015 at 05:23:56AM +0000, Alan Stearns wrote:
> On 2/6/15, 4:12 PM, "Peter Moulder" <pjrm@mail.internode.on.net> wrote:
> >On Fri, Feb 06, 2015 at 04:38:44AM +0000, Alan Stearns wrote:
> >
> >> Until then, I think a less-nuanced text-wrap:balance is still useful.
> >
> >More useful still would be a feature differing only in that it didn't make
> >as much of a change to the apparent measure, merely using this freedom to
> >avoid very short last line rather than insisting on having all lines equal.
> >Yes?
> No, I don’t agree. I think in current browsers the less-nuanced
> text-wrap:balance is more useful than a feature that tries to fix short
> last line lengths. Short last line lengths is a more difficult problem
> that will take more work to solve.

There might well be a misunderstanding here in what sort of solutions for a
paragraph each of us is envisages to be achieved in practice.  It's not that
I'm calling for additional effort to avoid changing the paragraph's apparent
measure too much, it's just that aiming for the last line to be half or
two-thirds full doesn't require as much of a change to normal measure as
aiming for a full last line does.

More generally, I didn't intend to require more sophistication than a
line-balancing feature would call for.

(On the contrary, balancing lines as described so far is not just aiming to
 avoid a *short* last line, it's trying to get more specifically a *full* last
 line.  [Full in the sense that all lines other than the last are full.]
 Achieving the more specific length of "about as full as other lines" is
 more difficult, and the one less amenable to a greedy approach that browsers
 would want to use.)

Any algorithm for balancing lines can be easily adapted to aim instead for a
half- or two-thirds-full last line; and simpler approaches are more acceptable
than for the balanced case because of the greater flexibility allowed on the
last line.

So from the point of view of web browsers, I do think it's advantageous not
to call for the last line to be as long as the others.

(For the higher-end UAs that are perhaps more the target of the feature, I
 think each is as implementable as the other, the decision would more be based
 on what sort of use cases is more important to the implementer.)

I think I'll avoid commenting too much more on aesthetics until I'm more sure
of how we see our options.  Perhaps I will just say that I see the evaluation
as being largely in terms of how accepting each use case is of different
lengths of the last line, and then we can go from that to what an implementation
should aim for.

> (headlines, short caption/aside)

The headlines case sounds interesting.  Do you have an example of the sort of
site where multi-line headlines would look better if the aim for a full last
line compared to aiming for a less than full last line?  (A complication here
is that headlines in newspapers & magazines often use a copy-fitted font-size
to fill the column(-span) width.)

I said that diagram labelling was the strongest case I could think of for
preferring a full last line, but I questioned how much of a use case that is
for a CSS declaration for approach to line breaking.  Does anyone wish to
comment on that?  (We might revisit this in future, of course.)

Received on Friday, 6 February 2015 09:28:05 UTC

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