[csswg-drafts] [css-display] When are run-in wrapped in anonymous block, exacly?

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

== [css-display] When are run-in wrapped in anonymous block, exacly? ==
The [Run-In Layout](https://drafts.csswg.org/css-display-3/#run-in-layout) says

2. If a run-in sequence is immediately followed by a block box [...], it is inserted as direct children of the block box [...]. This step recurses if possible [...].
3. Otherwise, an anonymous block box is generated around the run-in sequence and all immediately following inline-level content [...].

My understanding is that if I have

```html
<div style="display: list-item; list-style: inside">
  <span style="display: run-in">Run-in</span>
</div>
```

then the condition from step 2 does not hold, and thus the "otherwise" from step 3 wraps the run-in inside a block box. So the run-in and the `::marker` appear at different lines.

But I'm not sure about this:

```html
<span style="display: run-in">Run-in</span>
<div style="display: list-item; list-style: inside"></div>
```

The condition from step 2 does hold, and thus the run-in is inserted inside the div after its `::marker`, and recursion is attempted. But the condition does no longer hold. Then, does step 3 run or not, i.e. does the "otherwise" refer to the outermost or to the innermost condition in the recursion? If step 3 runs it would be like in the previous example, if it does not the run-in and the `::marker` will appear at the same line.


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

Received on Friday, 21 July 2017 09:22:58 UTC