[csswg-drafts] [css-display] [css-text-decor] Propagation of text-decoration with display:contents

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

== [css-display] [css-text-decor] Propagation of text-decoration with display:contents ==
>From [CSS Text Decoration](https://drafts.csswg.org/css-text-decor-3/#line-decoration),

>  the decorations are propagated to all in-flow children.

>From [CSS Display](https://drafts.csswg.org/css-display/#valdef-display-contents), `display: contents` means

> The element itself does not generate any boxes, but its children and pseudo-elements still generate boxes as normal.

Then, if a decoration is specified in an element which does not generate boxes, does the decoration propagate to the descendants which generate boxes?

`display: contents` does not affect inheritance, but text decorations are special because they propagate using a mechanism different than inheritance. I'm not sure if it is an element-tree thing, and thus the decoration should still propagate, or if it's a box-tree thing, and thus it shouldn't.

Example: https://jsfiddle.net/203oz4jr/

```html
<div>Foo</div>
```
```css
div {
  display: contents;
  text-decoration: underline;
}
```

Should Foo be underlined? It's underlined on Chrome, but not on Firefox.





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

Received on Tuesday, 28 March 2017 14:22:13 UTC