Re: [csswg-drafts] Definition of "Block-level box" in CSS2 Specification (#11126)

CSS2 isn't superclear about these concepts, you should check https://drafts.csswg.org/css-display-4/#glossary instead (not sure if you already did, since you are using the modern concept of principal box)

> implies that the status of being a "block-level box" depends on an ancestor's formatting context

Yes.

> which comes first: being a "block-level box" or participating in a block formatting context?

Nothing comes first, that's just a definition.
We say that a box is block-level if it participates in block layout, flex-level if it participated in flex layout, etc.

> Additionally, what happens to the principal block-level box of a block-level element if that element is referenced within an inline formatting context?

You can't have a block-level box in an inline formatting context. If the outer display type is `block`, then the box splits the inline formatting context, as explained in https://drafts.csswg.org/css2/#anonymous-block-level

> a block-level box is also a block container box

This is not a definition, it's a consequence of CSS2 having a more limited number of layouts. And you omitted "Except for table boxes", which nowadays also includes other things like flex and grid containers.

> The use of "also" suggests that there could be "block-level boxes" that are not "block containers,"

Yes, in CSS2, table boxes are block-level but not block containers.

> which contradicts the earlier statement that block-level boxes are inherently block containers

No.

> Is it correct to assume that a principal block-level box implicitly establishes a block formatting context, even in the absence of specific formatting context triggers (like float or absolute positioning)

No. A block-level box can only establish a block formatting context if its a block container (e.g. if it's a flex container it will establish a flex formatting context). But block boxes default to continuing the parent formatting context rather than establishing an independent one.



-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11126#issuecomment-2462012041 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 7 November 2024 11:37:14 UTC