W3C home > Mailing lists > Public > public-css-testsuite@w3.org > August 2010

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Thu, 05 Aug 2010 17:13:32 -0700
Message-ID: <4C5B53AC.40206@inkedblade.net>
To: "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>
Bruno's comments here are worth addressing in this testcase.


-------- 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
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

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 Fassino http://www.brunildo.org/test
Received on Friday, 6 August 2010 00:14:08 UTC

This archive was generated by hypermail 2.4.0 : Friday, 20 January 2023 19:58:15 UTC