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

[css3-*] [css3-box] Box Tree terminology for CSS3 specs

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 22 Nov 2011 12:31:48 -0800
Message-ID: <4ECC06B4.9020909@inkedblade.net>
To: "www-style@w3.org" <www-style@w3.org>
So that we can disentangle boxes from elements and logical boxes from box
pieces in our CSS3 specs, I'm proposing the following terminology (borrowing
from Rossen's work on css3-break):

element
   An element in the document tree or a pseudo-element. Elements have properties
   associated with them. An element generates zero or more boxes, but typically
   only one. Of the boxes generated, one of them is the principal box.
box
   A box in the box tree. Boxes also have properties associated with them.
box fragment
   A piece of a box that has been broken across line/page/column/etc breaks.

Layout specs should be mostly written in terms of boxes, not elements. If a spec
talks about elements, the editor should be very careful to check that the spec
should indeed be talking about elements, and not about boxes.

Tree relationships "child", "sibling", "parent" operate on the box tree,
not on the element tree, unless otherwise specified (e.g. "child element").
An out-of-flow box's parent is its in-flow parent, not its containing block.

I also suggest (separately) that the Applies-to: line of a spec describe the
types of boxes the property applies to rather than the types of elements the
property applies to. So "All elements" would change to "All box types", which
will mean "all box types except certain pseudo-elements as specified that
pseudo-element", e.g. ::first-line pseudo-elements and their generated boxes
do not accept 'height', as stated in the definition of ::first-line. This
would mean that the Applies-to line would not be applicable to e.g. 'display'.

Thoughts?

~fantasai
Received on Tuesday, 22 November 2011 20:32:18 GMT

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