Re: [csswg-drafts] [css-display][css-inline] Block containers should never establish an inline formatting context

I think there may be a problem in the block-inside-inline case. This depends on #1477, but the sane approach seems that the inline element generates a single inline box which is the parent of the block box.

So if you have `<main><span>Lorem ipsum<div></div>Lorem ipsum</span></main>`, you will get this box tree:

```
<main>: block box
  └ <span>: inline box
      └ <div>: block box
```

But in the fragment tree you want the `<div>` block to be a child of the `<main>` block. And thus `<main>` should not establish an IFC, and the `<span>` should be wrapped in an anonymous box. So it should really be

```
<main>: block box, BFC or no FC
  └ anonymous: block box, IFC root
     └ <span>: inline box, no FC
         └ <div>: block box, no FC
```

so that the fragment tree can end up as desired:

```
first&last fragment of <main>
  └ first fragment of anonymous
     └ first fragment of <span>
  └ first&last fragment of <div>
  └ last fragment of anonymous
     └ last fragment of <span>
```

To avoid this kinds of problems where you may end up needing an anonymous box, I would always generate it just in case.

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

Received on Monday, 19 March 2018 21:29:48 UTC