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

Re: [css-text-4] variants of pre-wrap and longhands of the white-space property

From: fantasai <fantasai.lists@inkedblade.net>
Date: Mon, 21 Sep 2015 20:18:46 -0400
To: Florian Rivoal <florian@rivoal.net>, www-style list <www-style@w3.org>
Message-ID: <56009E66.2020204@inkedblade.net>
On 09/19/2015 02:42 AM, Florian Rivoal wrote:
>
> 1) matching platforms conventions.
>
> I said "UAs may visually collapse the advance widths of preserved white space[...]"
> and "[...] the UA should match platform conventions"
>
> You changed it to: "[...] in order to match platform conventions [...],
> the UA <em>may</em> visually collapse [...]"
>
> As I read it, your phrasing only allows collapsing the advance widths of preserve white space if it is done do match platform conventions.
>
> My use of should instead of must in the second sentence was intentional.
> As preserve-auto was meant to allow UAs to keep (under a different name)
> the "smart" behavior that they currently have. And that behavior does
> not systematically match platform conventions.

It should. That is the only reason we're allowing multiple behaviors here.
Otherwise we should be converging on some sort of interoperable definition.
I don't see a good argument for being inconsistent with platform conventions
*and* being inconsistent with other Web browsers.

> 2) You changed
>
>    If 'text-wrap' is ''text-wrap/normal'' or ''text-wrap/balance'',
>    whether or not there are soft wrap opportunities
>    in preserved sequences of white space,
>    and if yes where and under what condition,
>    is UA defined.
> to
>    [the UA] is not required to honor
>    soft wrap opportunities between such spaces.
>
> where "such spaces" refers to "preserved white space that occur at the end of a line" in the previous sentence.
>
> While the overall phrasing is indeed much better, it was intentionally
> that I allowed the UA to ignore soft wrap opportunities in any preserved
> sequence white space, not just those that occur at the end of the line.
>
> The reason for that being that in IE's implementation (which we want to
> allow), soft wrap opportunities in white space in the middle of the line
> are ignored when there is a sequence of preserved white space that's
> overflowing the line.
>
> For example, if you render "a_b___c" (where _ stands for space) in a box
> that will hold 3 characters, IE will do this:
> |a_b|___
> |c  |
> (demo here: http://jsbin.com/zuleho/edit?html,css,output, tested in IE11 and Edge)
>
> If we only allowed not honoring soft wrap opportunities in the sequence
> at the end of the line, it would have to break before b instead.
>
> So I suggest changing to:
>    [the UA] is not required to honor all
>    soft wrap opportunities between or around white space.
>
> That's a bit different from what I had initially, but that's to make sure
> we allow IE to not break around the single space between a and b in the
> example above.

No, that's too broad. Suppose your example was CJK. The UA would then be
forced to break between CJK characters. That's clearly not what's wanted:
the effect you're looking for here is to ignore these spaces for the purpose
of calculating the line length for line-wrapping.

I've adjusted the wording accordingly. Let me know if that works.

~fantasai
Received on Tuesday, 22 September 2015 00:19:20 UTC

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