Skip to content
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

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

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

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

Loirooriol opened this issue Apr 7, 2017 · 3 comments

Comments

@Loirooriol
Copy link
Contributor

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]

@fantasai
Copy link
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.

@fantasai fantasai added the css-display-3 Current Work label Apr 18, 2017
@Loirooriol
Copy link
Contributor Author

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.

@fantasai
Copy link
Collaborator

fantasai commented May 15, 2017

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