Skip to content

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

Closed

Description

@Loirooriol

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".

Activity

  1. SelenIT commented on Jul 18, 2017

    @SelenIT
    Collaborator

    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?

  2. Loirooriol commented on Jul 18, 2017

    @Loirooriol
    ContributorAuthor

    @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.

  3. SelenIT commented on Jul 19, 2017

    @SelenIT
    Collaborator

    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:)

  4. tabatkins commented on Jul 28, 2017

    @tabatkins
    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.

  5. tabatkins commented on Mar 19, 2018

    @tabatkins
    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions