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

Re: [css3-flexbox][css21] "flexbox formatting context"

From: Anton Prowse <prowse@moonhenge.net>
Date: Sun, 20 May 2012 17:32:27 +0200
Message-ID: <4FB90E8B.1010702@moonhenge.net>
To: "www-style@w3.org" <www-style@w3.org>
CC: Alex Mogilevsky <alexmog@microsoft.com>, "Tab Atkins Jr." <jackalmage@gmail.com>
On 14/02/2012 21:46, Alex Mogilevsky wrote:
> "flexbox formatting context" is defined in section 2.1 of the spec as
> something similar to BFC, and it is never used again.
> Apparently we can't just say that flexbox is a BFC because BFC is
> defined to have specific layout type:
> In a block formatting context, boxes are laid out one after the
> other, vertically, beginning at the top of a containing block. The
> vertical distance between two sibling boxes is determined by the
> 'margin' properties. Vertical margins between adjacent block-level
> boxes in a block formatting context collapse.
> However the term BFC is very rarely used to refer to specific layout
> type, it is primarily used to refer to an independent layout
> container that margins don't collapse through and floats don't
> intrude into.
> It would be said if we had to introduce "grid formatting context",
> "region formatting context", "ruby formatting context" just to say
> that those boxes are BFCs...
> I think the term BFC should simply be used to refer to lack of margin
> collapsing and float wrapping. The contradiction of definitions can
> be avoided by adding text to CSS2.1-9.4.1 that block formatting
> context can have a different formatting model, for example if
> overridden by 'display' property. There is no stretch here really,
> flexbox is still formatting blocks, it just doesn't have to use the
> default algorithm of BFC...

Alex, I've filed your comments as a counter-proposal to the idea of 
introducing the more general term "formatting context" into CSS21 (aimed 
at aiding the resolution of other issues) without defining a base set of 
properties that a "formatting context" possess (such as preventing 
margin collapsing etc).  The latter proposal was made in 
http://lists.w3.org/Archives/Public/www-style/2012May/0494.html and is 
filed in https://www.w3.org/Bugs/Public/show_bug.cgi?id=17121

As it happens, I prefer the latter proposal.  I think that what you 
propose would be confusing; it would be editorially difficult in CSS21 
to decouple the universal BFC behaviour that you propose from the 
specific BFC-/only/ behaviour (eg width/height algorithms) that you 
don't typically want to generalize to the newer specs.  I think it's 
preferable to introduce a new term each time (eg "flexbox formatting 
context"), state that "it's like a BFC except...", and explicitly 
describe where the new behaviour diverges from the BFC behaviour 
currently defined in CSS21.

> Oh, and BTW "block formatting context" is no in CSS2.1 index, which
> makes it a hassle to find the definition...

Filed at https://www.w3.org/Bugs/Public/show_bug.cgi?id=17120

Anton Prowse
Received on Sunday, 20 May 2012 15:32:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:16 UTC