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 15:02:00 +1100
To: Alan Stearns <stearns@adobe.com>
Cc: "www-style@w3.org" <www-style@w3.org>
Message-ID: <20150206040200.GA11891@mail.internode.on.net>
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'

(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:

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.  As an extreme case, the title of a chapter (or of a book)
will sometimes contain a line consisting solely of "The" or "A":


which occurs in a book where there wasn't space for the first three words on
one line.  [I'm not certain about the chapter titles being right-justified.]
Clearly it would be more balanced as

           THE NET

but the phrasing isn't as good.

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.

Line breaking for captions is closer to that of a normal paragraph than for
many of the other potential uses of balancing.  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.

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

Someone mentioned blockquotes as another potential use for balancing.
These have even more need to look like a normal paragraph than a caption.
Blockquotes more frequently contain multiple paragraphs than the other
examples, and they need to appear to have much the same measure as each

I mentioned 'heading' in particular as benefitting from a distinct keyword
partly because its needs most differ from balancing, and partly because it
seems to be the most prominent potential use case for a balancing feature.

For the other potential use cases, it's not clear that a balance-lines feature
is the right solution.  Pull quotes and blockquotes might (for different
reasons) benefit from a mechanism for changing width of an element while
considering the element's line-breaking needs.  (Pull quotes because they're
often floated, blockquotes because of the multi-paragraph issue.)

(Similarly for a "callout" in the sense of a label at the end of a line or
 arrow in a diagram; though diagrams aren't a primary use case for CSS
 specification of line-breaking approach.)

Use cases other than pull quotes don't particularly call for all lines to
have similar length; maybe they'd benefit more from a feature that says that
it's more acceptable to decrease the apparent measure of the paragraph
to avoid other badnesses (short last line or phrasing considerations) than
in a normal body paragraph.

I'm particularly interested in a CSS specification including a "choose line
breaks suitable for a heading" feature because that's a feature that I already
intend to implement, and it would be good to have agreement on what the CSS
mechanism for expressing that should be.

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.

Received on Friday, 6 February 2015 04:02:42 UTC

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