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

Re: [CSS21] Distinguishing block boxes, block containers, and block-level elements

From: Anton Prowse <prowse@moonhenge.net>
Date: Sun, 01 Aug 2010 23:12:00 +0200
Message-ID: <4C55E320.3070709@moonhenge.net>
To: "www-style@w3.org" <www-style@w3.org>
CC: fantasai <fantasai.lists@inkedblade.net>
Anton Prowse wrote:
> fantasai wrote:
>> CSS2.1 Issue 120
>>   http://wiki.csswg.org/spec/css2.1#issue-120
>> The approach taken is to define existing terms more precisely, define a
>> couple of new terms, and use all of these terms more accurately 
>> throughout
>> the specification.

>>   | Block-level elements generate a principal block-level box that
>>   | contains descendant boxes and generated content and is also
>>   | the box involved in any positioning scheme.

>>   | Except for 'table' elements, which are described in a later chapter,
>>   | and replaced elements, the principal block-level box is also a
>>   | <dfn>block container box</dfn>.

>>   | A block container box contains either
>>   | only block-level boxes or only inline-level boxes.
> Hang on, what's a "block-level box"?  This is an important ambiguity.  I
> /think/ you intend it to be precisely a principal block-level box or an
> anonymous block-level box as described in (Anonymous block boxes).
> Note that you haven't really defined "block container box", although you
> have described its behaviour.  (I think perhaps these sorts of
> definition-by-behaviour-without-classification instances in the
> spec should be rewritten, since its usually unclear whether the /only/
> elements/boxes which are X are necessarily those mentioned when
> describing X's behaviour.) A block container box isn't necessarily a
> principal block-level box - nor block-level at all - for example:
>>   | Inline blocks, table cells, and table captions are also block
>>   | container boxes, but are not block-level boxes.

Is there such a thing as a block-level box which is not a block
container box?  By analogy with principal block-level boxes, I presume
that the anonymous box of a table might be one example, and  assuming
that a principal block-level box is a block-level box  the principal
block-level box of a replaced element is another.  Are there any other

>>   | Boxes that are
>>   | block-level block containers are called <dfn>block boxes</dfn>.
> OK.  The term "block box" is more specialized in your proposal than in
> the current spec.

>>   | Replaced block-level
>>   | boxes are considered block boxes, but are not block container boxes.
> This directly contradicts the definition!  Hence the definition needs
> rewording:
>   | A <dfn>block box</dfn> is a block-level box that is either a block
>   | container box or the principal block-level box of a replaced
>   | element or inline-block.
> (Note the addition of inline-block.)

Depending on the answer to my question posted above, it's likely the
case that the only type of block box that is not a block container box
is an anonymous table box.

Anton Prowse
Received on Sunday, 1 August 2010 21:13:44 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 16:28:14 UTC