W3C home > Mailing lists > Public > www-style@w3.org > March 2010

Re: [CSS21] 10.1 Containing block for absolute elements with inline-level nearest positioned ancestor

From: Brad Kemper <brad.kemper@gmail.com>
Date: Wed, 17 Mar 2010 10:43:42 -0700
Cc: Bruno Fassino <fassino@gmail.com>, www-style <www-style@w3.org>
Message-Id: <331D354A-054B-4EF5-8C42-C04B44F16B41@gmail.com>
To: Alan Gresley <alan@css-class.com>

On Mar 17, 2010, at 10:25 AM, Alan Gresley wrote:

> Bruno Fassino wrote:
>> According to
>>  http://www.w3.org/TR/CSS21/visudet.html#containing-block-details
>> item 4 subitem 1,
>> absolutely positioned elements whose nearest positioned ancestor is
>> inline-level  have a containing block defined using the first and the
>> last box of the ancestor.
>> Considering just the ltr case, the first box of the ancestor defines
>> the top and the left sides of the C.B., the last box defines the
>> bottom and the right sides.
>> An inline level element may extend on more lines, so the above implies
>> that in some cases the _right side_ of the C.B. is 'more' at the left
>> of the _left side_ of the C.B.. For example here, if 'RR RR' is a
>> relative positioned inline:
>> ............................RR
>> RR
>> the established C.B. has its right side just at the end of the last R
>> on the second line, and its left side at the beginning of the first R
>> on the first line.
>> I believe this situation is the one described in the spec with:
>>  "This may cause the containing block's width to be negative"
> 
> 
> This I think is referring to when there is a reversal of the direction. The above spec is a note to this line.
> 
> 
> # In the case that the ancestor is inline-level, the containing
> # block depends on the 'direction' property of the ancestor.
> 
> 
> # If the 'direction' is 'ltr', the top and left of the containing
> # block are the top and left padding edges of the first box
> # generated by the ancestor, and the bottom and right are
> # the bottom and right padding edges of the last box of the
> # ancestor.
> 
> 
> In your test case, the ancestor has the same direction and since the relative positioned element is inline [1], then it can not have any width at all.
> 
> 
> # The 'width' property does not apply.

Since that part about negative widths is talking specifically about inline widths, I don't think it is referring to the 'width' property. It is talking about the right edge being to the left of the left edge, which is logically a negative width.

Received on Wednesday, 17 March 2010 17:44:22 GMT

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