Skip to content

[css-display] Does run-in algorithm run multiple times for each run-in sequence? #1460

Closed
@Loirooriol

Description

@Loirooriol

Suppose I have this code

<span style="display: run-in">Foo</span>
<div>
  <p>Bar</p>
</div>

Then Run-In Layout says

If a run-in sequence is immediately followed by a block box that does not establish a new block formatting context, it is inserted as direct children of the block box

So the example above becomes

<div>
  <span style="display: run-in">Foo</span>
  <p>Bar</p>
</div>

But now the run-in sequence is still immediately followed by a block box that does not establish a new block formatting context.

Does the algorithm run again in order to obtain the following?

<div>
  <p><span style="display: run-in">Foo</span> Bar</p>
</div>

It think it should. But then, how to prevent the following quote from generating an infinite number of boxes?

Otherwise, an anonymous block box is generated around the run-in sequence and all immediately following inline-level content

<div>
  <p>
    <anonymous-block><span style="display: run-in">Foo</span> Bar</anonymous-block>
  </p>
</div>
<div>
  <p>
    <anonymous-block>
      <anonymous-block><span style="display: run-in">Foo</span> Bar</anonymous-block>
    </anonymous-block>
  </p>
</div>

And so on.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions