W3C home > Mailing lists > Public > www-style@w3.org > January 2011

[CSS21] WD 9.2.2.1: "would subsequently be collapsed away"

From: Peter Moulder <peter.moulder@monash.edu>
Date: Mon, 10 Jan 2011 08:36:12 +1100
To: www-style@w3.org
Message-id: <20110109213612.GC23949@bowman.infotech.monash.edu.au>
  # White space content that would subsequently be collapsed away
  # according to the 'white-space' property does not generate any
  # anonymous inline boxes.

(The issue discussed in this message is orthogonal to that discussed in
 the previous 9.2.2.1 message, even though that message proposed removing
 this literal paragraph.)


Maybe I'm misunderstanding the intent of "according to the 'white-space'
property", but I read the above-quoted paragraph as implying that the
space in

  <p><span>Hello</span> <span>world</span></p>

would get removed if the block width were 10 or fewer characters,
due to the "As each line is laid out" rules in 16.6.1, and that
the result would be identical to

  <p><span>Hello</span><span>world</span></p>

i.e. it could be rendered as

  Helloworld

!

Presumably this isn't a desirable result.

I suggest that the text needs clarifying to prevent this (or this
interpretation).


A problem with this "would" approach to specification is that the result
is undefined because there can be multiple hypotheticals to evaluate in
the one document, and the result for one of the tests can depend on what
result one picks for the other tests.  For example, consider a document
of

  <p><span>A</span> <span>B</span> <span>C</span></p>

and a block width of 4: it looks like there are two valid solutions.
Whereas considering block width 3 suggests that there might be an
exponential search involved in finding valid solutions to this sort of
problem in general, because supplying an answer to one question can
falsify an answer one has already assumed for a previous question.

(I'm sleepy as I write this; sorry if I've misanalyzed that.)

So it would be good if the "would" test were to be rewritten to an "is"
test, something where the test doesn't depend on what other whitespace
elements get created.

pjrm.
Received on Sunday, 9 January 2011 21:36:44 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:35 GMT