Skip to content
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

[css-display] Is the principal box unique? #1604

Closed
Loirooriol opened this issue Jul 14, 2017 · 5 comments
Closed

[css-display] Is the principal box unique? #1604

Loirooriol opened this issue Jul 14, 2017 · 5 comments

Comments

@Loirooriol
Copy link
Contributor

CSS Display says that, if it exists, the principal box is unique:

When an element generates one or more boxes, one of them is the principal box

However, what about an element with display: inline which is split by a block-level descendant? Then the element generates more than one inline box, so only one of them should be the principal according to the quote above, but this is not obvious.

I think all of them should be principal boxes, so the principal box is not unique and mentions of "the principal box" should say "a principal box" or "the principal boxes".

@tabatkins tabatkins added the css-display-3 Current Work label Jul 17, 2017
@SelenIT
Copy link
Collaborator

SelenIT commented Jul 18, 2017

Maybe these two fragments of the inline box are still considered one inline box fragmented between two anonymous block-level fragmentainers, similarly to how the fragments of inline blocks split into different line boxes belonging to different column/page boxes are still considered one (though fragmented) inline box?

I suppose that fragmentation of inline boxes between different line boxes (not limited to this particular case) should be clarified in the Fragmentation spec. Probably we need another issue about getting this type of fragmentation described properly?

@Loirooriol
Copy link
Contributor Author

@SelenIT My understanding from #1477 is that the inline element ends up generating multiple boxes. Generating a single box with multiple fragments would solve this, but then I'm not sure the box tree would be much well-defined, as I asked in #1477.

@SelenIT
Copy link
Collaborator

SelenIT commented Jul 19, 2017

I commented #1477 with my reasoning why I tend to see this as a single but fragmented box. I support the idea from your initial post there that this should be explained in CSS Break, because there are many other cases where inline boxed behave very similarly.

(BTW, I'm not very comfortable with the "inline box that can be broken between line boxes" concept at all. For me, the "box" is more like a single rectangle with definite position and dimensions that clearly define the place it takes on the screen. It's hard to me to think of an inline element broken between several lines as a single "box", it feels more like a set/collection of "boxes", each with its own dimensions and position. Maybe it's just me? But having "box fragment" term for each of these single rectangles helps me a bit:)

@tabatkins
Copy link
Member

BTW, I'm not very comfortable with the "inline box that can be broken between line boxes" concept at all. For me, the "box" is more like a single rectangle with definite position and dimensions that clearly define the place it takes on the screen.

In CSS terminology, "box" is a pre-layout concept; boxes don't have positions or sizes at all. "Fragment" is what results from the layout process, and has size and position.

@tabatkins
Copy link
Member

I raised the block-splits-inline question (splits box, or splits fragments?) in #1477; this issue depends on that one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants