Skip to content

[css-display][css-tables][css-flexbox][css-grid] 'block' outer display type does not always produce a block-level box #1704

Closed

Description

@Loirooriol

CSS Tables says that table generates a block-level table.

CSS Flexbox says that flex generates a block-level flex container.

CSS Grid says that grid generates a block-level grid container.

CSS Display says the above plus things like that block generates a block box.

However, this is only true in flow layout. Outside of flow layout, the block outer display type can also generate a flex-level or grid-level principal box.

I think there are two reasonable solutions:

  • Say that "flex-level" and "grid-level" are sublevels of "block-level" instead of entirely different things. So we could say e.g. that a flex item is both flex-level and block-level, but a block box in flow layout is only block-level.

    I think this would only require editing the text in CSS Flexbox and CSS Grid which says that flex items and grid items are not block-level.

  • Define a new term called "blocklike-level", "normal-level", "auto-level" or similar which is defined as such:

    • Inside flow layout, a synonym for "block-level".
    • Inside flex layout, a synonym for "flex-level".
    • Inside grid layout, a synonym for "grid-level".

    And then update the specs to use that term instead of "block-level" when necessary. I prefer this option, but it's more work.

In both cases it would be a good idea to define all the possible box levels in CSS Display.

Activity

  1. Loirooriol commented on Aug 7, 2017

    @Loirooriol
    ContributorAuthor

    By the way, is absolutely positioning another kind of box level?

  2. changed the title [-][css-display][css-tables][css-flexbox][css-grid] 'block' outer display type does not always produce a block-level[/-] [+][css-display][css-tables][css-flexbox][css-grid] 'block' outer display type does not always produce a block-level box[/+] on Mar 19, 2018
  3. tabatkins commented on Mar 19, 2018

    @tabatkins
    Member

    Display correctly specifies everywhere that the box is block-level or inline-level "when placed in flow layout".

    We've corrected the other specs to use similar wording.

  4. fantasai commented on Jun 21, 2018

    @fantasai
    Collaborator

    @Loirooriol (Yes, I think @tabatkins and I view absolute positioning as a different kind of box level. It's a totally different layout model, just happens to overlap in-flow layouts. Specs are just using “absolutely-positioned” instead of “xxx-level” to describe such boxes.)

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