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

Re: [CSS21] Issue 142: the term "ancestor box"

From: fantasai <fantasai.lists@inkedblade.net>
Date: Fri, 01 Apr 2011 22:14:03 -0700
Message-ID: <4D96B09B.7080902@inkedblade.net>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
CC: Bert Bos <bert@w3.org>, W3C style mailing list <www-style@w3.org>
On 04/01/2011 07:43 PM, Boris Zbarsky wrote:
>
> Percentage values are defined throughout in terms of the size of the containing block. But section 9.2.1.1 says:
>
> Anonymous block boxes are ignored when resolving percentage values
> that would refer to it: the closest non-anonymous ancestor box is
> used instead.
>
> whatever that means. It's not clear, because percentages are defined as percentages of a _rectangle_, not of anything to do
> with a particular box.

Right, but the rectangle is defined by referencing a box, so
while you need to dereference twice, there is a reference to
a box involved, and changing that basis should change the
result.

> I think we all know what we mean here, but we're not actually putting it into the spec. If I had to implement the current text
> without the various background I know, I'd at best get it wrong and at worst be very very confused and then get it even more
> wrong.

How else would you interpret that sentence in 9.2.1.1?

> The clean solution is probably to split the concepts of "containing block" and "the rectangle percentages are based on", give
> the latter a new name, and change all the places that should reference it to do so. This sounds like a lot of editorial risk.
>
> The "just hack it in" solution is probably to change the text in 10.1 step 2 as follows:
>
> 2. For other elements, if the element's position is 'relative' or
> 'static':
> a. If the containing block is being determined for the purpose
> of resolving a percentage value, it is formed by the content
> edge of the nearest block container ancestor box that is not
> an anonymous block.
> b. Otherwise the containing block is formed by the content edge
> of the nearest block container ancestor box.
>
> Thoughts?

I'd probably just tack on

  | For the purpose of resolving percentage values (only), the containing
  | block is determined while ignoring _anonymous block boxes_[9.2.1.1].

instead of splitting the item, but that should amount to the same thing,
yes?

~fantasai
Received on Saturday, 2 April 2011 05:14:41 GMT

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