[csswg-drafts] [css-display] Reconsider if 'inline-block' and 'inline flow-root' should be syntactically equivalent

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

== [css-display] Reconsider if 'inline-block' and 'inline flow-root'  should be syntactically equivalent ==
>From [Automatic Box Type Transformations](https://drafts.csswg.org/css-display-3/#transformations),

> For legacy reasons, if an `inline flow-root` box (aka `inline-block`) is blockified, it becomes a `block` box (losing its `flow-root` nature)

At first I thought this was acceptable because all current features that blockify also force block containers to establish a BFC, and thus the `flow-root` nature is not really lost in practice.

However, in #2673 it was resolved that blockifications and establishing FC are independent. This means that a future feature which only blockifies would make `inline flow-root` and `run-in flow-root` end up generating a block container with no BFC. This would be bad, and would force authors to continue using hacks like `overflow: hidden` to ensure that the element establishes a BFC.

For `inline-block` it's necessary to blockify to `block` due to backwards compatibility, and this is acceptable, but if the author explicitly uses `flow-root`, then this shouldn't be lost.

Therefore, I'm asking for a reconsideration of the resolution reversal from https://github.com/w3c/csswg-drafts/issues/1496#issuecomment-319986260 in favor of the original resolution from https://github.com/w3c/csswg-drafts/issues/1246#issuecomment-305246779

Current behavior: (blockifications in blue, inlinifications in green)
![current](https://user-images.githubusercontent.com/7477678/43047256-c55f9724-8dd4-11e8-93af-aab94db35b7e.png)

Unaliasing `inline-block` and `inline flow-root`,
![proposal](https://user-images.githubusercontent.com/7477678/43047295-85b3e78c-8dd5-11e8-86f3-63c67d432ea4.png)

However, instead of treating `inline-block` as an exception, it may make more sense to separate the `flow` inner display type into two:
![proposal2](https://user-images.githubusercontent.com/7477678/43047313-cbda7136-8dd5-11e8-9556-436eada772dc.png)

Intuitively, the two extra values in the 3x3 grid would be

 - A block container with no forced BFC, like `block`, but which inlinifies to an inline box.
 - A run-in block container, like `run-in flow-root`, but which blockifies to a block container with no forced BFC.

Currently there may not be enough use-cases to syntactically allow these combinations, but it could be beneficial to leave the door open to add them in the future.





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

Received on Sunday, 22 July 2018 16:51:01 UTC