w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.52k stars 672 forks source link

Clarification on BFC established by non-block containers #11175

Open gitspeaks opened 2 weeks ago

gitspeaks commented 2 weeks ago

In a recent discussion https://github.com/w3c/csswg-drafts/issues/11126#issuecomment-2466556663, it was stated that a block formatting context is established by a "block container" which isn't block-level. However, the initial containing block establishes a block formatting context even though it is not a block container—it’s defined as a rectangle. This suggests that a block formatting context can be established either by a block container or specifically by the ICB.

Could the documentation clarify exactly what types establish a block formatting context? Specifically, it would be helpful to understand if both block containers and the ICB—or potentially other types—are capable of establishing this context.

Loirooriol commented 2 weeks ago

That's beside the point, but block-level block containers may also establish a block formatting context, they just default to not doing so unless required.