Fwd: text-align:justify, inline-blocks, and MS test inline-formatting-context-019.xht

Bruno's comments here are worth addressing in this testcase.

~fantasai

-------- Original Message --------
Subject: text-align:justify, inline-blocks, and MS test inline-formatting-context-019.xht
Resent-Date: Tue, 09 Feb 2010 08:22:31 +0000
Resent-From: www-style@w3.org
Date: Tue, 9 Feb 2010 09:21:56 +0100
From: Bruno Fassino <fassino@gmail.com>
To: www-style <www-style@w3.org>

At 9.4.2 :
"When the total width of the inline boxes on a line is less than the
width of the line box containing them, their horizontal distribution
within the line box is determined by the 'text-align' property.
If that property has the value 'justify', the user agent may stretch
spaces and words in inline boxes (except for inline-table and
inline-block boxes) as well"

What does the part  "(except for inline-table and inline-block boxes)"  mean?
I don't think it means that  "inside"  inline-tables and inline-blocks
  there is no stretching of spaces and words when text-align:justify.

I think that the Microsoft test
http://test.csswg.org/source/contributors/microsoft/submitted/Chapter_9/inline-formatting-context-019.xht
adds more confusion. It has the following assertion:

" If 'text-align' is set to 'justify' the user agent does not stretch
spaces and/or words when the 'display' property is set to
'inline-block' "

which again seems to imply that "inside" inline-block elements spaces
and/or words are not stretched when 'text-align' is set to 'justify'.
But then the test is not really precise. The reason why the second
line is not stretched is simply that it is the _last_ (and the only
one) inside the inline-block element. The first line is instead
stretched because it is the first of two consecutive lines (the second
one including just the inline-block box, acting like a single word).
If some text is added inside the inline block to have two lines, then
stretching will occur here as well, in all browsers, see for example
this modified version
http://www.brunildo.org/test/test/inline-formatting-context-019.html).


Inline-block elements generate a single inline box (whose width is not
affected by text-align), but then inside them text-align works as
usual in all browsers, with possible stretching when it is 'justify'
and there is more than a line.  So I can't figure out what the spec
wanted to exclude when saying:  "(except for inline-table and
inline-block boxes)"
Maybe it simply wanted to say that the "external" single inline box
generated by an inline-block element is not stretched by text-align,
but the current words do not really say this.


Best regards,
Bruno

-- 
Bruno Fassino http://www.brunildo.org/test

Received on Friday, 6 August 2010 00:14:08 UTC