-
Notifications
You must be signed in to change notification settings - Fork 711
[css-display-3] parent box vs anon boxes #3259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
IMO the problem is that this "parent box" concept has a misleading name. It doesn't refer to the parent node in the box tree. So I agree that anonymous boxes can have children in the box tree, but they are just not taken into account by this "parent box" concept. I don't know whether this is appropriate because I haven't seen any use of the concept.
I'm not that sure. In CSS2, it's true that anonymous boxes can generate a containing block, but then they are skipped when doing percentage resolution:
However, I haven't seen this statement ratified by any CSS3 spec. This makes me think that maybe anonymous boxes can no longer generate a containing block. In fact, before the big rewrite, CSS Box defined containing block like this: csswg-drafts/css-box-3/Overview.bs Lines 564 to 568 in 24ef9b6
|
Renaming this concept to something other than "parent box" might well be an appropriate fix, assuming that there is indeed prose that intends to refer to this concept rather than parent node in box tree and that such prose can be updated to use the new name. [Regarding anonymous boxes and percentages, note that the quoted CSS2 visuren.html text is limited to anonymous block boxes: other anonymous boxes, such as anonymous table cells, still establish the containing block in the sense of being used as the basis for resolving percentage widths.] |
No, it's just an error. The definition should match @prjnt's expectations in the OP. :) |
OK @prjnt , I posted some edits. Lmk if it looks correct now or if you have any suggestions for improvement! |
Based on feedback from @Loirooriol in issue 3158, the text now reads
|
https://drafts.csswg.org/css-display-3/#css-parent-box says:
The above implies that an anonymous box is not the parent box of any element's principal box, whereas I believe that it is desired that anonymous boxes can have an element's principal box as a child box, and that the anonymous box should sometimes furthermore establish the containing block for an element's principal box.
The text was updated successfully, but these errors were encountered: