W3C home > Mailing lists > Public > www-style@w3.org > September 2012

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

From: Anton Prowse <prowse@moonhenge.net>
Date: Mon, 03 Sep 2012 22:56:53 +0200
Message-ID: <50451995.2090503@moonhenge.net>
To: www-style@w3.org
CC: fantasai <fantasai.lists@inkedblade.net>
On 04/08/2012 12:45, Anton Prowse wrote:
> On 25/07/2012 08:23, fantasai wrote:
>> This minimizes the changes while keeping a coherent flow of ideas
>> through/between each paragraph.
>
> This is very similar to my Proposal B in [2].

We're iterating towards something mutually agreeable. Here's a proposal 
which incorporates the majority of each of our preferences.


(1) The definition of "principal block-level box" is extended to
"principal box" for a wider range of elements (in CSS21: 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.  The definition is moved to 9.2 since it is no longer 
specific to block-level elements.

(2) The term "block container element" is introduced to mean an
element whose principal box is a block container box (in CSS21:
block, inline-block, list-item, table, inline-table, table-caption, 
table-cell).

(3) Technical terms used are linked to their definitions further down 
the chapter.

(4) The term "block-level element", which is currently only fuzzily 
defined, is formally defined in 9.2.1 to mean an element whose principal 
box is block-level.  The incomplete list of 'display' values which make 
an element block-level is explicitly called out as non-exhaustive.

(5) The discussion of the relationship between block container boxes and 
block-level boxes is qualified as being specific to CSS21, thus making 
this section forwards-compatible with future levels.

(6) The description of the values of the 'display' property in 9.2.4 are 
made more careful, ensuring that generated boxes are explicitly stated 
to be principal boxes where necessary (thus ensuring that the spec is 
clear about which elements are block-level and/or block containers).  An 
existing sentence is parenthesized in the 'inline-block' value 
description, since it is both slightly woolly and redundant.

(7) A couple of tweaks are made to 17.4 (Tables in the visual formatting 
model) to ensure that the descriptions used tie in correctly with the 
other changes, eg as per (6) above.


Proposal E:

   : 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.
   :
   : <MovedFrom9.2.1><DEL>Each block-level element generates</DEL>
   : <INS>Certain values of the 'display' property cause an element of
   : the source document to generate</INS> a
   : *principal <DEL>block-level</DEL> box* that contains descendant
   : boxes and generated content and is also the box involved in any
   : positioning scheme. Some <DEL>block-level</DEL> 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.</MovedFrom9.2.1>
   :
   : 9.2.1 Block-level elements and block boxes
   :
   : Block-level elements <DEL>are</DEL> <INS> – </INS> those elements of
   : the source document that are formatted visually as blocks (e.g.,
   : paragraphs)<DEL>.</DEL> <INS> – are elements which generate a
   : block-level principal box.</INS> <DEL>The following values</DEL>
   : <INS>Values</INS> of the 'display' property <INS>that</INS> make an
   : element block-level<DEL>:</DEL> <INS>include</INS> 'block',
   : 'list-item', and 'table'. <MovedFromBelow>*Block-level boxes* are
   : boxes that participate in a
   : _block formatting context_.</MovedFromBelow>
   :
   : <MovedToAbove>Block-level boxes are boxes that participate in a
   : block formatting context.</MovedToAbove> <MovedTo9.2>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.</MovedTo9.2>
   :
   : <DEL>Except for table boxes, which are described in a later
   : chapter, and replaced elements</DEL><INS>In CSS 2.1</INS>, a
   : block-level box is also a block container box <INS>unless it is
   : a table box or the principal box of a replaced element</INS>. A
   : block container box either contains only block-level boxes or
   : establishes an _inline formatting context_<link to 9.4.2> and thus
   : contains only _inline-level boxes_<link to 9.2.2>. <INS>An element
   : whose principal box is a block container box is a *block container
   : element*. Values of the 'display' property which make a
   : non-replaced element generate a block container include 'block',
   : 'list-item' and 'inline-block'.</INS> Not all block container boxes
   : are block-level boxes: non-replaced inline blocks and non-replaced
   : table cells are block containers but <INS>are</INS> not block-level
   : <DEL>boxes</DEL>. Block-level boxes that are also block containers
   : are called block boxes.
   :
   : The three terms "block-level box," "block container box," and
   : "block box" are sometimes abbreviated as "block" where unambiguous.


   : 9.2.4 The 'display' property
   :
   : [...]
   :
   : The values of this property have the following meanings:
   :
   : block
   :   This value causes an element to generate a <INS>principal</INS>
   :   block box.
   :
   : inline-block
   :   This value causes an element to generate <DEL>an</DEL>
   :   <INS>a principal</INS> inline-level block container.
   :   <INS>(</INS>The inside of an inline-block is formatted as a block
   :   box, and the element itself is formatted as an atomic
   :   inline-level box.<INS>)</INS>
   :
   : inline
   :   This value causes an element to generate one or more inline
   :   boxes.
   :
   : list-item
   :   This value causes an element (e.g., LI in HTML) to generate a
   :   principal block box and a marker box. [...]
   :
   : none
   :   [...]
   :
   : table, inline-table, table-row-group, table-column,
   : table-column-group, table-header-group, table-footer-group,
   : table-row, table-cell, and table-caption
   :   [...]


   : 17.4 Tables in the visual formatting model
   :
   : In terms of the visual formatting model, a table can behave
   : like a block-level (for 'display: table') or inline-level (for
   : 'display: inline-table') element.
   :
   : In both cases, the table generates a principal block
   : <INS>container</INS> box called the table wrapper box that
   : contains the table box itself and any caption boxes (in
   : document order). The table box is a block-level box that contains
   : the table's internal table boxes. The caption boxes are
   : <INS>principal</INS> block-level boxes that retain their own
   : content, padding, margin, and border areas, and are rendered as
   : normal block boxes inside the table wrapper box. Whether the
   : caption boxes are placed before or after the table box is decided
   : by the 'caption-side' property, as described below.
   :
   : The table wrapper box is <DEL>a 'block' box if the table is
   : block-level</DEL> <INS>block-level for 'display: table'</INS>, and
   : <DEL>an 'inline-block' box if the table is inline-level</DEL>
   : <INS>inline-level for 'display: inline-table'</INS>. [...]


Cheers,
Anton Prowse
http://dev.moonhenge.net
Received on Monday, 3 September 2012 20:57:23 GMT

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