[csswg-drafts] [css-display][css-flexbox][css-grid] Interaction of 'display: contents' and 'run of text'

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

== [css-display][css-flexbox][css-grid] Interaction of 'display: contents' and 'run of text' ==
[Various specifications](https://github.com/w3c/csswg-drafts/search?q=%22run+of+text%22) use the term 'run of text'. For example, [CSS Flexbox](https://drafts.csswg.org/css-flexbox/#flex-items) and [CSS Grid](https://drafts.csswg.org/css-grid/#grid-items):

> each contiguous run of text that is directly contained inside a flex container is wrapped in an anonymous flex item.

> Each contiguous run of text that is directly contained inside a grid container is wrapped in an anonymous grid item.

But as far as I know, this term is not defined anywhere. So I don't know how it should interact with `display: contents`. For example, https://jsfiddle.net/p63c5uyt/

```css
div {
  display: flex;
  flex-direction: column;
}
span {
  display: contents;
}
```
```html
<div>Foo<span>Bar</span></div>
```

Should Bar appear next to or below Foo?

Both Firefox and Chrome consider that `display: contents` makes both Foo and Bar to be in the same run of text. This is not obvious to me.

Tab wants (https://github.com/w3c/csswg-drafts/issues/1118#issuecomment-295144510)
> to define "text" as an object in the element tree that has properties (only set via inheritance), and which generates "text" in the box tree accordingly

not sure if this has any impact, given that Foo and Bar are different text nodes in the DOM.

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

Received on Sunday, 23 April 2017 15:53:40 UTC