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

> Then it goes on to define a concept of “becoming a formatting context”, but doesn't explain how this is different from “establishing a formatting context”

As Tab commented in https://github.com/w3c/csswg-drafts/issues/1581#issuecomment-313223924

> Some elements define that they establish a formatting context; there is no general definition of how to make an arbitrary element establish a formatting context.

>> If the element already establishes a formatting context of any kind, this condition is satisfied.
> Except for inline formatting contexts!

I agree, this exception should be called out.

> [...] and that this is a used value time transformation of the display value... which makes no sense because box generation depends on computed values.

Ok, that was the wrong way to go about it. Would there be a problem with simply moving this fix-up to computed value time?


> for example, it's saying that display: ruby element becomes a display: flow-root when contain: paint is set on it.

I don't think it is saying that: `display: ruby` causes the box to be a ruby container,  which in turns means it [establishes a ruby formatting context](https://drafts.csswg.org/css-ruby-1/#formatting-context). Since it already establishes a formatting context, becoming a formatting content is a no-op:

> If the element already establishes a formatting context of any kind, this condition is satisfied. 

That said, as @Loirooriol pointed out, this may be insufficient, and we may need to come up with something better.

That said, maybe this should be excluded from css-contain? css-contain already layout and paint containment do not take effect on internal table elements. Maybe ruby elements should be excluded as well? I have a bit of a hard time thinking of legitimate use cases of containment on ruby or ruby parts.

> Not sure about layout internal types.

For internal table parts, neither css-contain nor css-multicol invoke "becomes a formatting context". For ruby internal parts, multicol does not, and (as discussed above) maybe contain shouldn't either.

This doesn't mean that we don't need to define what this does, but there is no particular expectation from the current places that invoke this.

-- 
GitHub Notification of comment by frivoal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1457#issuecomment-313627971 using your GitHub account

Received on Friday, 7 July 2017 09:01:37 UTC