Re: [csswg-drafts] [css-display] Should anonymous boxes always inherit through the box tree?

> This is inconsistent with how inheritance works for elements, thus the surprise.

We didn't have a case where you could have non-box-generating element with visible text children before display:contents. There is nothing to be inconsistent with; the case is new. It seem that the simplest solution would be that the text properties are defined by the parent box.

> I'm very confused by this statement. You're correct that being styled via inheritance from a display:contents element isn't surprising. That's what we're trying to ensure will happen! Right now, as vaguely written, text won't inherit from a display:contents parent element; our concept of "text nodes" carrying styles ensures that it does, like normal elements do.

I don't find it particularly surprising that a non- box generating element doesn't affect child text node style. In fact that's what I would expect. The text node is behaving as it was a direct child of the box-generating ancestor, something that is easily explained.

Perhaps there is some better example than has been presented here so far why this is a bad or inconsistent? The argument in the original post is that what makes it surprising is that an unstyled element would still be affected via inheritance. I was curious why people found it surprising.


-- 
GitHub Notification of comment by anttijk
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1118#issuecomment-306411745 using your GitHub account

Received on Tuesday, 6 June 2017 08:00:40 UTC