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

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

From: Peter Moulder <peter.moulder@monash.edu>
Date: Thu, 07 Oct 2010 13:17:58 +1100
To: W3C style mailing list <www-style@w3.org>
Message-id: <20101007021758.GB14557@bowman.infotech.monash.edu.au>
On Sun, Aug 22, 2010 at 03:19:56PM +0200, Bert Bos wrote:
> This is proposed text for issue 142[1]. Section 10.1 uses the term
> "ancestor box," by which it means the "box of an ancestor element."

I certainly didn't expect that definition myself.

For example, I thought that the ancestor boxes of a box that runs in would
include the box that it ran into, which isn't the box of an ancestor element.
Also, I thought that the ancestor boxes of an inside marker box of B would
include B, which isn't the box of an ancestor element of the element that
generated the marker box.

> But apparently the term causes confusion.  That is probably because in some
> cases and in some implementations the boxes form a tree.  (CSS doesn't say
> that the boxes form a tree, only that each box is associated with an element
> and the elements form a tree.)

I thought that boxes were a specification abstraction used to facilitate
defining positions for things, I didn't think they referred to implementation
details.  It would be very bad for the CSS spec to specify implementation details.

It's true that the current spec doesn't say much about the box tree.  My
understanding was that this is to be changed so that margin collapsing and
table generation become defined.  (I also expected that section 10.1 (and 10.3
and 10.6 and really most of the spec that deals with coordinates of things)
would be changed to talk about boxes instead of elements.)

Although the current spec doesn't explicitly say that boxes form a tree, it
does nevertheless make several references to children of boxes, a box's parent
box, and a box's sibling boxes, which does at least suggest that they form
something quite like a tree (or forest).  If we're to avoid the term "ancestor box"
for fear that it's undefined, then I would guess that all the other references
to children or parents of boxes would also need changing.

(Also phrases like "the box contains" (which usually or always needs to be
 understood in terms of tree relationships rather than geometrically contains,
 which can differ due to negative margins and such); though such occurrences
 might need rewording "contains an X" -> "has a child X" in any case.)

Received on Thursday, 7 October 2010 02:18:29 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:39 UTC