Skip to content

[css-display] Glossary *-level definitions #1186

Closed

Description

@Loirooriol

CSS display defines inline-level as

inline-level: Content that participates in inline layout. Specifically, inline-level boxes and text.

First, the "specifically, inline-level boxes" part seems completely superfluous.

Moreover, if I understood properly, text is not inline-level. Instead, what happens is that text directly contained inside a block container is wrapped inside an anonymous inline element, and it's that element what is inline-level, not the text itself.

And then, I guess "participates in inline layout" means "participates in an inline formatting context". The former expression does not seem to be used anywhere else, while the latter is used everywhere. This is confusing.

And similarly for block-level:

block-level: Content that participates in block layout. Specifically, block-level boxes.

Same problem about "block layout", and "specifically, inline-level boxes" seems superfluous too.

Instead, I would just say:

inline-level: Content that participates in an inline formatting context.
block-level: Content that participates in a block formatting context.

While we are at it, why not add

flex-level: Content that participates in a flex formatting context. [CSS3-FLEXBOX]
grid-level: Content that participates in a grid formatting context. [CSS3-GRID-LAYOUT]

Activity

  1. fantasai commented on Apr 18, 2017

    @fantasai
    Collaborator

    Text is inline-level, because the contents of an inline box are inline-level and text and inline-level boxes can be intermixed as the contents of such boxes. The extra text is not superfluous, it's necessary for understanding what's going on... otherwise it's not defined at all how text participates in the box model.

  2. Loirooriol commented on Apr 18, 2017

    @Loirooriol
    ContributorAuthor

    OK, I stand corrected. I still think that repeating the terms you are defining inside the definition seem a circularity. But now I see the definition is about "inline-level content", and it references "inline-level box". So not exactly the same, but still a problem if the definition of "inline-level box" is "box that is inline-level content".

    What about this:

    inline-level content: box or contiguous run of text that participates in inline layout.
    block-level content: box that participates in block layout.

    Or

    inline-level: content that participates in inline layout. Note: can either be a box or text.
    block-level: content that participates in block layout. Note: necessarily must be a box.

    Possibly linking inline formatting context and block formatting context.

  3. fantasai commented on May 15, 2017

    @fantasai
    Collaborator

    I think what's there already is strictly more precise than your last suggestion... so closing out as invalid.

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