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

On 08/02/2010 03:13 PM, Anton Prowse wrote:
> Anton Prowse wrote:
>> fantasai wrote:
>>> 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.
>>> | 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>.
>> Note that under your proposal, a table now generates a principal
>> block-level box, but this is not a block container box. In the existing
>> spec, a table explicitly doesn't generate a principal block-level box,
>> but I think you've exactly captured the required distinction.
> Note that we have no term to describe the "inside" behaviour of a
> principal block-level box of a table. Maybe it's enough to describe it
> as a "table box" when we need to highlight that aspect of it.

That's probably sufficient.

>>> | 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).
> ...or an anonymous table-wrapper box of a table box arising from a
> display:table element (or equivalently from an anonymous table box with
> a non–inline grandparent box)? Such a box would seem to be a
> block container box participating in a block formatting context.
> Note that an inline-table would also generate a block-level table box
> (that sits inside an inline-level block container box; note that Chapter
> 17 currently makes a mess of this subtlety, particularly in the case
> that the table box is anonymous). Does we think it deserves to be
> called the *principal* block level box of the inline-table element?
> Note that this would make inline-table elements the only inline-level
> elements that generate a principal block-level box.

Hm, that's a good point. I think the tables chapter assumes the
principal box of a table is the one that contains rows and columns,
because it calls the outer one an "anonymous" box. However,
according to the definitions in 9.2, it's the anonymous box that's
the principal box. So either we need to make the outer box non-anonymous,
or change the definition for principal boxes in 9.2.

>>> | An <dfn>inline box</dfn> is one that is both inline-level and whose
>>> | children (if any) would participate in its containing inline
>>> formatting
>>> | context. For non-replaced elements, a 'display' value of 'inline' and
>>> | sometimes 'run-in' (when it is not creating a block box) generates an
>>> | inline box. Inline-level boxes that are not inline boxes (such as
>>> | replaced inline elements, inline-block elements, and inline-table
>>> | elements) are called <dfn>atomic inline boxes</dfn> because they
>>> | participate in their inline formatting context as a single opaque box.
> The atomic inline boxes generated for an inline-block and inline-table
> are also block container boxes, right? This would need stating.

This is covered in the new text that describes block container boxes
in 9.2.1.


Received on Monday, 9 August 2010 15:59:09 UTC