Description
I see various problems with the Becoming a formatting context section.
In some circumstances (See [CSS-CONTAIN-1] or [CSS3-MULTICOL] for examples), an element may need to become a formatting context.
"See" should be lowercase.
Situations that CSS2.1 said produced a block formatting context when in fact they only needed to become a formatting context should be listed here. This includes out-of-flow boxes, and boxes to which overflow
applies and is different than visible
. Maybe also mention block containers that are not block boxes.
If the element already establishes a formatting context of any kind, this condition is satisfied.
Except for inline formatting contexts! Inline formatting contexts are not contained at all, they are e.g. affected by floats, so contain: layout
is not satisfied by a block container that establishes an inline formatting context, it must establish a block formatting context instead.
And what about ruby formatting contexts? I know very little about them, but I don't think establishing a ruby formatting context is enough neither.
I propose:
- If the inner display type is
flow-root
,table
,flex
orgrid
, the condition is satisfied. - If the inner display type is
flow
, it is changed toflow-root
. - An element with a
ruby
inner display type always (not just if the outer display type is different thaninline
) generates two boxes: a principal box with the inner display type set toflow
and the outer display type set to the outer display type of the element, and an inline-level ruby container. "Becoming a formatting context" only affects the principal box, changing its inner display type toflow-root
. - Not sure about layout internal types.