- From: Anton Prowse <prowse@moonhenge.net>
- Date: Wed, 18 Jul 2012 09:55:06 +0200
- To: www-style@w3.org
- CC: fantasai <fantasai.lists@inkedblade.net>
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: # 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> # # 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. # A block container box either contains only block-level boxes or # establishes an inline formatting context and thus contains only # inline-level boxes. <del>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>Block container elements are elements whose principal box # is a block container box. The following values of the # 'display' property make an element a block container: 'block', # 'list-item', 'table', 'inline-block', 'inline-table'. Non-replaced # inline blocks and non-replaced table cells are block containers but # are not block-level. # # The three terms "block-level box," "block container box," and # "block box" are sometimes abbreviated as "block" where unambiguous. Note: the only change from Proposal A is that a paragraph has moved from 9.2.1 to 9.2. 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 Cheers, Anton Prowse http://dev.moonhenge.net
Received on Wednesday, 18 July 2012 07:55:41 UTC