[csswg-drafts] [css-display][css-ruby][css-contain] Becoming a formatting context

Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-display][css-ruby][css-contain] Becoming a formatting context ==
I see various problems with the [Becoming a formatting context](https://drafts.csswg.org/css-display-3/#becoming-formatting-context) section.

> In some circumstances (See [\[CSS-CONTAIN-1\]](https://drafts.csswg.org/css-display-3/#biblio-css-contain-1) or [\[CSS3-MULTICOL\]](https://drafts.csswg.org/css-display-3/#biblio-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` or `grid`, the condition is satisfied.
 - If the inner display type is `flow`, it is changed to `flow-root`.
 - An element with a `ruby` inner display type always (not just if the outer display type is different than `inline`) generates two boxes: a principal box with the inner display type set to `flow` 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 to `flow-root`.
 - Not sure about layout internal types.


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1457 using your GitHub account

Received on Tuesday, 23 May 2017 20:20:56 UTC