-
Notifications
You must be signed in to change notification settings - Fork 715
Clarification on block box with mixed level boxes #8772
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
It depends. There are a few different ways of implementing this. Blink previously did what you describe but now we do:
(there are other approaches as well). The reason for this is you may have DOM structure like:
https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=11591 Making sure the filter applies to the block-in-inline is non-trivial with the first approach. Ian |
@bfgeek do you think the specs should be changed to reflect this? I believe that what you just described doesn't sound spec-conformant to me. |
Yeah that section of the css2 spec is bad/over-perscriptive - and lacks experience of these things in practice (esp. that paint affects on inline elements, and how positioning works, etc). Likely that section should have a warning surrounding it. We've found that the approach described above is significantly simpler, and all the side-effects are exactly the same is the first approach. Ian |
I wonder if Gecko and WebKit do the same as well. |
Blink's old code was exactly the same as WebKit. Gecko also does the first apporach. EdgeHTML I believe had a similar approach to what we do now. |
So it seems only Blink is non spec compliant. I am not sure if this is an issue or are browsers allowed to implement this however they want. |
Browsers can do whatever they want as long as the result looks like the specified behavior. |
@Loirooriol So I believe I got my answer, which is yes my assumption is indeed correct. Should I close this or leave it open because of Blink’s behavior? |
I guess this can be closed as question answered. To be more explicit, yes, your description in the 1st comment matches https://www.w3.org/TR/CSS22/visuren.html#anonymous-block-level and https://drafts.csswg.org/css-display-3/#block-container But once we have a CSS Flow spec, I guess it can be reconsidered whether to follow CSS2 or something like Blink. |
Given a markup like this:
Now since block containers can only have block-level or inline-level boxes, I assume the box tree would look like this:
Is my assumption correct?
The text was updated successfully, but these errors were encountered: