Skip to content

[css-display] Blockifications should establish a new formatting context #2598

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

Closed
Loirooriol opened this issue Apr 20, 2018 · 4 comments
Closed

Comments

@Loirooriol
Copy link
Contributor

It seems that in all cases in which an element is blockified, it also needs to establish a new formatting context.

So instead of specifying both transformations everywhere, it would be simpler if https://drafts.csswg.org/css-display-3/#transformations said that blockifying causes the element to establish a new formatting context.

Then, other specifications that require blockifications (like flexbox or grid) wouldn't need to explicitly require a new formatting context, because it would already be implied.

Additionally, a flow-root inner display type becomes flow when blockified. Then someone could think that the element stops being a BFC root. Explicitly saying that this is not the case (because the element establishes a new formatting context) would clear up the confusion.

@tabatkins
Copy link
Member

Nope, grid items get blockified, but subgrids do not establish a new FC.

It's definitely usually the case (and could probably use a note in the spec that you can generally expect it), but it's not fundamental to blockification.

@tabatkins
Copy link
Member

(The Grid 2 spec doesn't explicitly specify that subgrids don't form a new FC yet, but that's definitely what happens - their layouts intertwine with their parent, which is the definition of "not a new formatting context". We'll fix this in Grid 2 in a bit.)

@Loirooriol
Copy link
Contributor Author

OK, I didn't think about subgrids, https://drafts.csswg.org/css-display-3/#valdef-display-grid will also need to be updated.

@Loirooriol
Copy link
Contributor Author

@tabatkins Then, I think the spec should say this:

If an element with a flow inner display type is blockified, the generated block container establishes an independent formatting context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants