Discussion:
[css-containment][css-display] Layout containment on display: contents and display: run-in
(too old to reply)
Kyle Zentner
2015-07-15 18:52:01 UTC
Permalink
Raw Message
Hi www-style,

I'm implementing 'contain: layout' in Gecko right now. One of my test cases
set 'display: contents' on a 'contain: layout' element.

I don't see any obvious way for this to work. What should happen in this
case?

Similarly, it's not clear how 'contain: layout' should be applied to a
'display: run-in' element, since its layout depends on whether it contains
a block.

Should FCification take care of these cases? If so, how?

Thanks!
Tab Atkins Jr.
2015-07-15 20:15:15 UTC
Permalink
Raw Message
Post by Kyle Zentner
Hi www-style,
I'm implementing 'contain: layout' in Gecko right now. One of my test cases
set 'display: contents' on a 'contain: layout' element.
I don't see any obvious way for this to work. What should happen in this
case?
It doesn't generate a box, so 'contain' has nothing to apply to.
Post by Kyle Zentner
Similarly, it's not clear how 'contain: layout' should be applied to a
'display: run-in' element, since its layout depends on whether it contains a
block.
This sounds like it's about the legacy kinda-nonsensical definition of
run-in that 2.1 used to define. The current definition, in Display,
has nothing to do with the run-in's contents. (Except that it'll
usually inlinify its contents.)
Post by Kyle Zentner
Should FCification take care of these cases? If so, how?
Yes, FCification will occur, turning it from "flow" into "flow-root"
(like an inline-block). This hasn't been written yet, but fantasai
brought it up a few days ago in another thread.

~TJ
Florian Rivoal
2017-04-20 06:01:27 UTC
Permalink
Raw Message
Post by Kyle Zentner
Hi www-style,
I'm implementing 'contain: layout' in Gecko right now. One of my test cases set 'display: contents' on a 'contain: layout' element.
I don't see any obvious way for this to work. What should happen in this case?
Similarly, it's not clear how 'contain: layout' should be applied to a 'display: run-in' element, since its layout depends on whether it contains a block.
Should FCification take care of these cases? If so, how?
The working group has decided to clarify: style containment works even when when display is contents, but other types of containment have no effect. This is now reflected in the editor's draft.

—Florian

Loading...