Re: [CSS21] Proposal to define "Block container element"

A couple of questions:

- Is this discussion relevant to CSS 2.1 only? In other words, is a "block
container" defined in CSS3 somewhere?

- Would the proposed definition also apply to such things as <textarea>,
elements with float, and elements with absolute position?

Aharon

On Sat, Jul 21, 2012 at 1:09 PM, Anton Prowse <prowse@moonhenge.net> wrote:

> On 18/07/2012 09:55, Anton Prowse wrote:
>
>> On 18/07/2012 00:50, fantasai wrote:
>>
>>> On 07/14/2012 07:12 PM, Anton Prowse wrote:
>>>
>>>>
>>>> (1) The definition of "principal block-level box" is extended to
>>>> "principal box" for a wider range of elements (inline block,
>>>> inline table and table cell in addition to block-level elements). This
>>>> has no effect on the rest of the spec, since the only
>>>> cases where the principal box is referred to is in the context of
>>>> block-level elements/boxes.
>>>>
>>>> (2) The term "block container element" is introduced to mean an
>>>> element whose principal box is a block container box, ie a
>>>> block, list-item, inline-block, table, inline-table or table-cell in
>>>> CSS21.
>>>>
>>>
>>> I don't have a problem with defining these terms, however I do have
>>> a problem with defining "principal box" generally in 9.2.1, which
>>> is titled "Block-level elements and block boxes". If we're defining
>>> it, it should go in 9.2.
>>>
>>
>> I see your point, of course; but 9.2.1 already defines "block container
>> box" which is nothing to do with block-level elements or block boxes
>> either, and I was trying to disrupt the spec text at little as possible.
>>
>> But here's a proposal that factors the block container stuff out into 9.2:
>>
>> Proposal B
>>
> ( s/block container stuff/principal box stuff/ )
>
>
> And here's a proposal that factors out both the principal box stuff /and/
> block container stuff into 9.2.
>
>
> Proposal C:
>
>   # 9.2 Controlling box generation
>   #
>   # The following sections describe the types of boxes that may be
>   # generated in CSS 2.1. A box's type affects, in part, its behavior
>   # in the visual formatting model. The 'display' property, described
>   # below, specifies a box's type.
>   #
>   # <ins>Each _block-level element_<link to 9.2.1>, inline block,
>   # inline table and table cell generates a *principal box* that
>   # contains descendant boxes and generated content and is also the
>   # box involved in any positioning scheme. Some block-level elements
>   # may generate additional boxes in addition to the principal box:
>   # 'list-item' elements. These additional boxes are placed with
>   # respect to the principal box.</ins>
>   #
>   # <ins>*Block container elements* are non-replaced elements whose
>   # principal box is a block container box. A *block container box*
>   # either contains only _block-level boxes_<link to 9.2.1> or
>   # establishes an _inline formatting context_<link to 9.4.2> and thus
>   # contains only _inline-level boxes_<link to 9.2.2>. The following
>   # values of the 'display' property make a non-replaced element a
>   # block container: 'block', 'list-item', 'table', 'inline-block',
>   # 'inline-table'.</ins>
>   #
>
>   #
>   # 9.2.1 Block-level elements and block boxes
>   #
>   # *Block-level elements* are those elements of the source document
>
>   # that are formatted visually as blocks (e.g., paragraphs). The
>   # following values of the 'display' property make an element
>   # block-level: 'block', 'list-item', and 'table'.
>   #
>   # <del>Block-level boxes are boxes that participate in a block
>   # formatting context. Each block-level element generates a principal
>   # block-level box that contains descendant boxes and generated
>   # content and is also the box involved in any positioning scheme.
>   # Some block-level elements may generate additional boxes in
>   # addition to the principal box: 'list-item' elements. These
>   # additional boxes are placed with respect to the principal box.</del>
>   #
>   # <ins>The principal box of a block-level element is a block-level
>   # box. *Block-level boxes* are boxes that participate in a block
>
>   # formatting context.</ins> Except for table boxes, which are
>   # described in a later chapter, and <ins>the principal box of</ins>
>   # replaced elements, a block-level box is also a block container box.
>   # <del>A block container box either contains only block-level boxes
>   # or establishes an inline formatting context and thus contains only
>   # inline-level boxes. Not all block container boxes are block-level
>   # boxes: non-replaced inline blocks and non-replaced table cells are
>   # block containers but not block-level boxes.</del> Block-level boxes
>
>   # that are also block containers are called block boxes.
>   #
>   # <ins>Non-replaced inline blocks and non-replaced table cells are
>   # block containers but are not block-level.</ins>
>
>   #
>   # The three terms "block-level box," "block container box," and
>   # "block box" are sometimes abbreviated as "block" where unambiguous.
>
> Note: the only changes from Proposals A and B are that some sentences have
> moved from 9.2.1 to 9.2 whilst the fact that block container elements are
> non-replaced has been reiterated.
>
>
>  Note: I chose to move the bit about list items and their additional box
>> to 9.2.  Whilst not strictly necessary for this proposal since that
>> sentence is about block-level elements, elsewhere I propose[1] to modify
>> this to mention the table box of table elements  - and I wanted to
>> mention the table box of inline table elements too, but since the
>> sentence was talking about block-level elements I didn't.  Moving the
>> bit about additional boxes to the more neutral 9.2 makes it easy to
>> update that proposal to mention inline tables at that position.
>>
>>
>> [1] http://lists.w3.org/Archives/**Public/www-style/2012Jul/0414.**html<http://lists.w3.org/Archives/Public/www-style/2012Jul/0414.html>
>>
>
> Cheers,
> Anton Prowse
> http://dev.moonhenge.net
>
>

Received on Sunday, 22 July 2012 08:44:33 UTC