Re: FW: NoWrap property [CSS2.1] [css3-text]

Robert O'Callahan wrote:
>
>> This is something that's not clear in the spec: does removed whitespace still
>> create a break opportunity? It would be good to discuss this in the context
>> of what we want for CSS3. E.g. suppose there is a 'discard' value for white
>> space.
> 
> In CSS3 white-space-collapse and text-wrap are orthogonal, so while it 
> might not be 100% obvious, it could actually be useful for 
> white-space-collapse:discard to work with text-wrap:normal to hide all 
> white-space but continue using it for breaking purposes. It might make 
> more sense to name the white-space-collapse value 'hide' instead of 
> 'discard'.
> 
> I do think it's desirable to allow collapsed-away whitespace to create 
> break opportunities. Otherwise we have the situation that
> <span style="white-space:nowrap">Hello</span> Kitty
> has a break opportunity but adding a space in the span to get
> <span style="white-space:nowrap">Hello </span> Kitty
> makes that break opportunity go away. It's rare for adding text to 
> remove line breaks, and would definitely shock users in editing situations.

Makes sense to me. How about appending to this paragraph in 2.1:

   # Then, the entire block is rendered. Inlines are laid out, taking bidi
   # reordering into account, and wrapping as specified by the 'white-space'
   # property.

the following:

   | When wrapping, line breaking opportunities are determined based
   | on the text prior to the white space collapsing steps above.

We'd have to make the equivalent changes to CSS3 Text, of course.
(Or possibly only to CSS3 Text, leaving this undefined for CSS2.1.)

~fantasai

Received on Monday, 8 December 2008 22:19:56 UTC