- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Fri, 01 Apr 2011 22:43:14 -0400
- To: fantasai <fantasai.lists@inkedblade.net>
- CC: Bert Bos <bert@w3.org>, W3C style mailing list <www-style@w3.org>
On 4/1/11 5:43 PM, fantasai wrote:
> So the final text we have right now is a little different than the above.
> Given that we've removed run-ins, it seems pretty solid to me. Can you
> take a look and let me know whether there's anything remaining ambiguous?
So the key part is that the definition of "block container box" is "a
box that either contains only block-level boxes or establishes an inline
formatting context and thus contains only inline-level boxes", yes?
That definition is correct as far as it goes, I think, given the
understanding that the table wrapper and caption boxes are actually
block boxes and hence block containers. The enumeration after the
definition could use rephrasing to make it clear that it's an
_exhaustive_ list of non-block-box block containers.
However defining the containing _block_ (which is a rectangle, not a
box!) to be the content edge of the nearest block container ancestor
_box_ leads to a self-contradiction in the spec. Specifically, per the
new item 2 of section 10.1, the containing block for a child of an
anonymous block is the rectangle formed by the content edge of the
anonymous block. 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.
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.
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?
-Boris
Received on Saturday, 2 April 2011 02:43:49 UTC