-
Notifications
You must be signed in to change notification settings - Fork 672
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
[CSS2] Clarify how the root element is laid out. #6480
Comments
See also #1599, which is about clarifying that the root element is in-flow in CSS2 .1 |
OK, we've clarified that the ICB is establishes a block formatting context, and that the root box establishes an independent formatting context. This should make the root element's layout fully defined. The main open question is whether the root should also be allowed to float -- there's no reason for it not to be able to, but some implementations don't handle it, see discussion in #7207 |
Closing out the issue, let me know if anything seems to still be a problem. :) |
CSS 2.2 Section 9.3 says that the root element is out-of-flow. CSS-Display's (convenience) Glossary definition of out-of-flow does not mention the root element.
Sometimes the root element is treated like it's out-of-flow, e.g. by default, its box contains its floats, showing that it establishes a BFC (2.2 Section 10.6.7) although from (2.2 Section 9.4.1) it's not clear why. The only clause which could fit is "block containers that are not block boxes". It's definitely by default a block container, so for it not to be a block box, it would have to be not block-level. Which is possible if the initial containing block doesn't establish a BFC, . (I can't find any CSS spec that says anything about this), since only a box that participates in a BFC can be block-level (2.2 Section 9.2.1)
On the other hand, for the calculations of the widths and heights, the root element's box is treated according to the rules of Block-level, non-replaced elements in normal flow (2.2 Sections 10.3.3 & 10.6.3).
I think 10.3.3. and 10.6.3 definition should be extended to make clear that they apply to the root element.
The text was updated successfully, but these errors were encountered: