Skip to content

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

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

Closed
Loirooriol opened this issue Aug 7, 2017 · 3 comments

Comments

@Loirooriol
Copy link
Contributor

Loirooriol commented Aug 7, 2017

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.

@Loirooriol
Copy link
Contributor Author

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

@fantasai fantasai added the css-display-3 Current Work label Aug 15, 2017
@tabatkins tabatkins 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 Mar 19, 2018
@tabatkins
Copy link
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.

@fantasai
Copy link
Collaborator

fantasai commented Jun 21, 2018

@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
Projects
None yet
Development

No branches or pull requests

3 participants