Skip to content

[css-display] Notation proposal: 'flow container' #1265

Closed

Description

@Loirooriol

The term "block container" is misleading. CSS 2.1 defines it as

A block container box either contains only block-level boxes or establishes an inline formatting context and thus contains only inline-level boxes.

However, the name seems to suggest that it can only contain block-level boxes. Probably, that's why CSS Display wrongly (#1185) defines it as

A box whose contents participate in a block formatting context.

So maybe the notation should change. Something like

  • flow container: either a block container or an inline formatting context root.
  • block container: a box whose contents participate in a block formatting context. [...]
  • inline formatting context root: box that establishes a new inline formatting context for its contents.
  • block box: a block-level box that is also a flow container.
  • <display-inside>: flow: If its outer display [...]. Otherwise it generates a flow container box. [...] It either establishes a new block or inline formatting context for its contents, or integrates its contents into its parent formatting context.
  • <display-inside>: flow-root: The element generates a flow container box [...]. It always establishes a new block formatting context for its contents.

This would be more consistent with the flow and flow-root keywords.

Activity

  1. tabatkins commented on May 15, 2017

    @tabatkins
    Member

    We agree that "flow container" would probably have been a better term to use originally, but at this point "block container" is used reasonably widely across CSS specs, so we probably shouldn't change it.

    It's also a little more familiar for authors to link up "X container" to "display: X", which holds with "block container", but not "flow container" (because "display: X flow" can use either inline or block for the X).

  2. Loirooriol commented on May 16, 2017

    @Loirooriol
    ContributorAuthor

    Yes, I also noticed that "flow container" wouldn't be consistent with display: block. I was thinking about some alternative proposal about requiring the contents of a block container to always be block-level (as the name implies), wrapping sequences of inline-levels inside a block-level inline container, which would be what establishes the inline formatting context. But this would be a new kind of box, and even only allowing it for anonymous ones would have its own problems, so maybe it's better as it is now.

  3. gitspeaks commented on Nov 15, 2024

    @gitspeaks
    Contributor

    It's also a little more familiar for authors to link up "X container" to "display: X", which holds with "block container", but not "flow container" (because "display: X flow" can use either inline or block for the X).

    Personally, I find the opposite to be true. The connection implied by "X container" to "display: X" in this case is actually quite confusing—it trips me up, especially when an inline-block element is designated as a block container. Using the term "Flow Container" feels more intuitive, as it suggests a broader category of element display designations which include list-item without implying a specific designation.

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