Re: [csswg-drafts] Is there a CSS box for text node content? (#4197)

Would there be something wrong with considering that each text-run which is not the sole child of an inline box is wrapped in an anonymous inline box (which would then have a content area, a border box, and all the other things boxes have)?

This seems consistent with https://drafts.csswg.org/css-display-3/#block-container:

Since a block container contains "only inline-level boxes participating in an inline formatting context, or contains only block-level boxes participating in a block formatting context", then either text nodes *are* inline-level boxes (which means they are boxes, and you can talk about their border box), or they are thus implicitly wrapped in anonymous inline boxes (in which case you can talk about the border box of those).

As far as I can tell, the presence of these anonymous wrappers is non observable, so defining them into existence should cause no issue, but it gives us some well defined concept to talk about in cases like the one raised by @npm1.

(In the original comment, speaking of the content box or border box would then be identical, since in the absence of selectors that can target those boxes, the padding and border width would always be 0.)


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

Received on Monday, 15 June 2020 06:07:14 UTC