This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 17121 - Desire to introduce the concept of a "formatting context" for forwards compatibility
Summary: Desire to introduce the concept of a "formatting context" for forwards compat...
Status: RESOLVED FIXED
Alias: None
Product: CSS
Classification: Unclassified
Component: CSS Level 2 (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Bert Bos
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-20 14:29 UTC by Anton P
Modified: 2012-09-13 10:07 UTC (History)
0 users

See Also:


Attachments

Description Anton P 2012-05-20 14:29:56 UTC
CSS Level 3 layout specs need to introduce formatting contexts which are very similar to block formatting contexts but which are used to format boxes other than block-level ones.  (For example, a flexbox establishes a flexbox formatting context for laying out flexbox items.)  It is editorially useful to be able to refer to formatting contexts in general, without specifying whether they are bloxk, flexbox, etc.

Moreover, 'overflow' (for example) is defined for block containers (and should be defined for table boxes - see Bug ____) but if we wish to avoid having to extend the Applies To line for 'overflow' in each new layout spec, it would be good to have defined a more general type of box to which we could say that 'overflow' applies.
Comment 1 Anton P 2012-05-20 14:31:42 UTC
Bug ____ = Bug 15381
Comment 2 Anton P 2012-05-20 14:43:22 UTC
Issue reported by Morten Stenshorne

Conversation begins:
Bug description: http://lists.w3.org/Archives/Public/www-style/2012May/0438.html

Proposal A: http://lists.w3.org/Archives/Public/www-style/2012May/0494.html

In 9.4 (Normal flow), replace:

   # Boxes in the normal flow belong to a formatting context, which may
   # be block or inline, but not both simultaneously. Block-level boxes
   # participate in a block formatting context. Inline-level boxes
   # participate in an inline formatting context.

with:

   | Boxes in the normal flow belong to a formatting context, which in
   | CSS21 may be block, inline or table. In future levels of CSS, other
   | types of formatting context will be introduced. Block-level boxes
   | participate in a block formatting context. Inline-level boxes
   | participate in an inline formatting context. Table formatting
   | contexts are described in the chapter on _tables_.

In 17.4 (Tables in the visual formatting model), replace:

   # [...] The table wrapper box establishes a block formatting context.
   # [...]

with:

   # [...] The table wrapper box establishes a block formatting context,
   # and the table box establishes a table formatting context. [...]

In 17.5 (Visual layout of table contents), replace:

   # Internal table elements generate rectangular boxes with content and
   # borders. Cells have padding as well. Internal table elements do not
   # have margins.

with:

   # Internal table elements generate rectangular boxes which
   # participate in the table formatting context established by the
   # table box. These boxes have content and borders, and cells have
   # padding as well. Internal table elements do not have margins.
Comment 3 Anton P 2012-05-20 14:51:17 UTC
Alex Mogilevsky has a counter-proposal.

Conversation begins: http://lists.w3.org/Archives/Public/www-style/2012Feb/0588.html

He argues that it's frustrating to have to define new formatting contexts in specs using wording along the lines of "they're pretty much like a BFC but involving box types other than block level". He observers that the term BFC is very rarely used to refer to specific layout type; rather, it is primarily used to refer to an independent layout container that margins don't collapse through and floats don't intrude into.

Instead of introducing "flexbox formatting context", "grid formatting context", etc, he suggests that the term BFC should simply be used to refer to lack of margin collapsing and float wrapping.
Comment 4 Anton P 2012-05-20 14:52:43 UTC
Let's label Alex's proposal as Proposal B.
Comment 5 Anton P 2012-07-15 08:46:55 UTC
the WG resolved[1] to accept Proposal A in Comment 2, subject to clarifying when an inline formatting context is established.[2]

The proposed clarification is:

Add, as the first sentence of 9.4.2 (Inline formatting contexts), the 
following sentence:

   | An inline formatting context is established by a block
   | container box that contains no block-level boxes.

http://lists.w3.org/Archives/Public/www-style/2012Jul/0342.html


[1] http://lists.w3.org/Archives/Public/www-style/2012Jun/0475.html
[2] http://lists.w3.org/Archives/Public/www-style/2012Jun/0656.html
Comment 6 Anton P 2012-08-03 15:42:16 UTC
The WG resolved[1] to accept the clarification given in Comment 5.

Hence the changes which were resolved upon to address this issue are as follows.


Add, as the first sentence of 9.4.2 (Inline formatting contexts), the 
following sentence:

   | An inline formatting context is established by a block
   | container box that contains no block-level boxes.

In 9.4 (Normal flow), replace:

   # Boxes in the normal flow belong to a formatting context, which may
   # be block or inline, but not both simultaneously. Block-level boxes
   # participate in a block formatting context. Inline-level boxes
   # participate in an inline formatting context.

with:

   | Boxes in the normal flow belong to a formatting context, which in
   | CSS21 may be block, inline or table. In future levels of CSS, other
   | types of formatting context will be introduced. Block-level boxes
   | participate in a block formatting context. Inline-level boxes
   | participate in an inline formatting context. Table formatting
   | contexts are described in the chapter on _tables_.

In 17.4 (Tables in the visual formatting model), replace:

   # [...] The table wrapper box establishes a block formatting context.
   # [...]

with:

   # [...] The table wrapper box establishes a block formatting context,
   # and the table box establishes a table formatting context. [...]

In 17.5 (Visual layout of table contents), replace:

   # Internal table elements generate rectangular boxes with content and
   # borders. Cells have padding as well. Internal table elements do not
   # have margins.

with:

   # Internal table elements generate rectangular boxes which
   # participate in the table formatting context established by the
   # table box. These boxes have content and borders, and cells have
   # padding as well. Internal table elements do not have margins.


[1] http://lists.w3.org/Archives/Public/www-style/2012Aug/0087.html