[css-houdini-drafts] [css-layout-api] Removing `childDisplay: 'normal'` , and replacing with `childDisplay: 'inline'`. (#946)

bfgeek has just created a new issue for https://github.com/w3c/css-houdini-drafts:

== [css-layout-api] Removing `childDisplay: 'normal'` , and replacing with `childDisplay: 'inline'`. ==
Currently the default when registering a custom layout if for blockification to occur on all children. E.g.
```html
<div style="display: layout(foo);">
  abc
  <div></div>
  def
</div>
```

`abc`, and `def` are wrapped in anonymous blocks.

This corrorsponds to:

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

```js
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 <div> would turn into an atomic inline.

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

Received on Friday, 13 September 2019 05:15:08 UTC