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

Hi Fantasai,

> On 11 Sep 2015, at 17:40, Florian Rivoal <florian@rivoal.net> wrote:
> 
> Since we resolved on to take option 1 [1], here is a pull request:
> 
> https://github.com/w3c/csswg-drafts/pull/49
> 
> - Florian
> 
> [1] https://lists.w3.org/Archives/Public/www-style/2015Sep/0040.html


Thanks for merging, and for the phrasing improvements you added.

However, there are two semantic changes in your rephrasing which I disagree with, so I'd like to argue it out.

(link to your commit: https://github.com/w3c/csswg-drafts/commit/98a0e3ffc12948b6a598dc9487b93b3e0f8bb61b)


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. 


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.

 - Florian

Received on Saturday, 19 September 2015 06:42:47 UTC