Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[css-display] When are run-in wrapped in anonymous block, exacly? #1640

@Loirooriol

Description

@Loirooriol

The Run-In Layout says

  1. 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 [...].
  2. 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

<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:

<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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions