Re: [csswg-drafts] [css-display] Understanding blockification (#12216)

@chearon Here’s how I understand it: some CSS features depend on the *type of element* specifically whether it’s a block or inline element and that’s separate from the formatting context. For example, take the `height` property. The [spec](https://drafts.csswg.org/css2/#inline-non-replaced) is super clear about how it works on inline, non-replaced elements:

> The `height` property does not apply.

Now think about a `<span>`. It’s originally an inline element, so by default, you can’t set its height. But what if you absolutely position it, or put it inside a flex container? Suddenly, you *can* change its height. That would normally conflict with it being "inline."

So how does CSS handle that? It "blockifies" the element meaning it treats the element as *not inline* so stuff like `height` can actually work in that context.

Blockification is kind of like saying, for this situation, let’s give this element standard block box behavior.

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


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

Received on Friday, 30 May 2025 16:43:02 UTC