[csswg-drafts] [css-display] Do empty text nodes generate text runs?

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

== [css-display] Do empty text nodes generate text runs? ==
Do text nodes with an empty string value generate a text run or not?

The difference will affect [run-in layout](https://drafts.csswg.org/css-display-3/#run-in-layout):

> If a run-in sequence is immediately followed by a block box [...]

Ans it's also observable in flow layout. According to [CSS 2.2](https://www.w3.org/TR/CSS22/visuren.html#inline-formatting),

> Line boxes that contain no text [...] must be treated as not existing [...]

I guess "text" refers to text runs. See https://jsfiddle.net/rs94bpay/

```html
<div><div>Foo</div></div>
```
```css
div {
  white-space: pre;
  border: 1px solid blue;
}
```
```js
document.querySelector('div').prepend('');
```
Firefox does not discard the line because of the text run, Chrome and Edge do.


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

Received on Tuesday, 12 September 2017 15:38:48 UTC