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

On 2/6/15, 3:02 PM, "Peter Moulder" <pjrm@mail.internode.on.net> wrote:

>On Fri, Feb 06, 2015 at 01:10:14AM +0000, Alan Stearns wrote:
>
>> > On Feb 6, 2015, at 11:57 AM, Peter Moulder
>><pjrm@mail.internode.on.net> wrote:
>> > 
>> > I'll write more later, but can I ask that we not add "balance"
>> > without also adding at least "heading" ?
>> 
>> Do you mean make the value "balance-heading" to distinguish the case
>>from
>> last line length? Or something else?
>
>Ah, I see the ambiguity.  By "add 'balance' without adding 'heading'", I
>meant
>"that we not add a new value 'balance' without also adding at least a
>'heading'
>value".  
>
>(Not that this feature needs to be implemented as new values to
>'text-wrap';
> avoiding wrapping within a particular phrase is somewhat orthogonal to
>the
> overall choice of line breaks between the words & phrases of a block.)
>
>
>Adding a bit more explanation now:

Thanks for the in-depth explanation. This is quite helpful.

>
>I mean that the way to choose line breaks for a heading differs
>substantially
>from how one would choose line breaks for a caption, which differs (less
>substantially) from how one would choose line breaks for a pull quote.
>
>I've noticed that good line breaks for a heading are often very
>unbalanced:
>phrasing considerations are much more important in headings than in
>captions
>and pull quotes.

I am a little skeptical of a text-wrap value that will choose breaks using
some sort of phrase analysis. This seems highly language- and
context-dependent. It might be better to indicate phrasing in the markup
(since it’s semantic) then use text-wrap:avoid for the phrase elements.
That way the line break mechanism doesn’t have to guess at what is a
significant phrase, will attempt to avoid breaking within a phrase, but
breaks within a phrase will be allowed if absolutely necessary.

>
>Headings have an especially high preference for breaking at a colon, even
>if
>the result is very unbalanced.  "From left to right:" would be a good
>place
>to end a line in a heading, but rarely in a caption.

So perhaps in this case you’d have two spans in the heading, the first up
to and including the colon, the second containing everything after. Those
spans could have text-wrap:avoid to ensure the heading broke after the
colon in a two-line situation, and that the break after the colon was
preserved in cases where more line breaks were needed.

From Left to Right:
Moving Adroitly

From Left to
Right:
Moving Adroitly

>
>Line breaking for captions is closer to that of a normal paragraph than
>for
>many of the other potential uses of balancing.

That depends, I think, on whether the caption is longer or shorter. If
it’s a paragraph-sized caption I agree, and I might not use
text-wrap:balance in that situation. If it’s a shorter caption
(particularly in video captioning) then it may look better with full
balancing. As you note with block quotes below, balancing works best with
a small number of lines (and as the number of lines grows, the actual
change in line breaks when balancing diminishes).

>  Phrasing is still important
>(you'd try not to break up a name in a caption of a photograph), but the
>last
>line of a paragraph will still often be shorter than the others.  Captions
>have a bit more need to be a similar width as other captions on the page
>than for other potential uses of balancing.

I agree that it may be better not to use balancing if/when there is more
than one caption visible at the same time.

>
>Compare with a pull quote, where the last line can be as long or longer
>than
>the others (though many pull quotes do have a shorter last line), and it's
>no problem for two pull quotes visible at the same time to have different
>measures.

I’m not sure that’s the case - if the pull quotes are in the same column,
it can look strange to have different measures.

> (snip things I generally agree with where I don’t have a useful comment)

>
>I don't think we can say much about how a balancing feature should behave
>(how
>length similarity should trade off against other line-breaking
>considerations)
>without considering particular uses.  For the use cases mentioned above,
>I'd be more interested in one of the other mechanisms mentioned above.
>Most similar to a balancing declaration would be the "more free to reduce
>apparent measure than in other paragraphs" declaration.

I am definitely interested in eventually arriving at a place where we can
express “more free to do this” and “try to avoid this other thing when
possible” and have several inputs to line-breaking decisions be weighed
against each other. But I unfortunately think that will take some time.
Until then, I think a less-nuanced text-wrap:balance is still useful.

Thanks,

Alan

Received on Friday, 6 February 2015 04:39:13 UTC