Skip to content

[css-layout-api] Removing childDisplay: 'normal' , and replacing with childDisplay: 'inline'. #946

Open
@bfgeek

Description

@bfgeek

Currently the default when registering a custom layout if for blockification to occur on all children. E.g.

<div style="display: layout(foo);">
  abc
  <div></div>
  def
</div>

abc, and def are wrapped in anonymous blocks.

This corrorsponds to:

registerLayout('foo', class {
  layoutOptions = {childDisplay: 'block'};
});

We also introduced childDisplay: 'normal' so that anonymous blocks weren't inserted and the inline level children could be laid out line by line.

This turns out to be difficult for our implementation currently, what is significatly easier is a `childDisplay: 'inline'.

E.g.

registerLayout('foo', class {
  layoutOptions = {childDisplay: 'inline'};
});

This would inlinify all the children into one "child" which could be laid out line-by-line.

In the example above the

would turn into an atomic inline.

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