In 9.4.1 of the CSS 2.2 standard: 
https://www.w3.org/TR/2016/WD-CSS22-20160412/visuren.html#block-formatting 
<https://www.w3.org/TR/2016/WD-CSS22-20160412/visuren.html#block-formatting>

it says “Floats, absolutely positioned elements, block containers […], and 
block boxes with 'overflow' other than 'visible’ […] establish new block 
formatting contexts for their contents”.

I was thinking about this today, and got to wondering why these necessarily 
establish a block formatting context?  Why doesn’t the standard say 
“establishes either a new block formatting or new inline formatting context”?

It seems to me that if I create a new float, that contains only inline 
elements, that this forces the creation of an anonymous block-level box (that 
then contains the inline boxes) simply to meet the requirements of the float 
creating a block formatting context. To be sure, I don’t currently see how this 
would affect an end user ineither way, so this question is doubtlessly on the 
esoteric side.  I’m mainly concerned if there’s some ramification of this that 
I haven’t thought of.

All I can figure is that it is easier to just say that a block with a new block 
formatting context gets positioned relative to a float differently than one 
that isn’t, than to say both that and saying a block with a new inline 
formatting context gets positioned relative to a float differently.

Thanks for any insights.


David

Reply via email to