Skip to content

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

Closed

Description

@Loirooriol

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.

Activity

  1. tabatkins commented on May 7, 2018

    @tabatkins
    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.

  2. tabatkins commented on May 7, 2018

    @tabatkins
    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.)

  3. Loirooriol commented on May 7, 2018

    @Loirooriol
    ContributorAuthor

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

  4. Loirooriol commented on May 9, 2018

    @Loirooriol
    ContributorAuthor

    @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

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