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

Right.

Without this "text node"/"text run" concept (just relying on "text is styled according to its enclosing box" concept), the first example in the OP gives red text, because the anonymous inline box that gets generated around the text has to inherit from its parent box, which is generated by the `section`; while in the second example, it gets green text, because it inherits from the `span`'s generated box, and the `span` is able to inherit from the `div` in the element tree.

With this concept, the text node inherits from the div or span in the element tree, getting `color:green` in both cases.

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

Received on Thursday, 1 June 2017 18:56:08 UTC