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][css-flexbox] Blockification of layout-internal type #1340

Closed
Loirooriol opened this issue May 9, 2017 · 3 comments
Closed
Labels
Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-display-3 Current Work Tracked in DoC

Comments

@Loirooriol
Copy link
Contributor

CSS Display defines blockification as such:

blockification [...] sets the box’s outer display type, if it is not none or contents, to block [...]

Some trivial examples:

  • A flex item with display: block (i.e. block flow) remains block flow (and establishes a BFC).
  • A flex item with display: inline (i.e. inline flow) becomes block flow (and establishes a BFC).
  • A flex item with display: inline-block (i.e. inline flow-root) becomes block flow-root.
  • A flex item with display: flow-root (i.e. block flow-root) remains block flow-root.
  • A flex item with display: table-cell (i.e. table-cell flow-root) becomes block flow-root.
    Note: Edge generates anonymous table parents instead, according to an old Flexbox spec.
  • A flex item with display: table is especially defined in CSS Flexbox.

But now the interesting part:

  • A flex item with display: table-row (i.e. table-row table-row) becomes block table-row.

But this combination is not defined! How is it supposed to behave?

Firefox and Chrome seem to treat it like display: block. Edge still generates an anonymous parent table. https://jsfiddle.net/sn6y4y0m/1/

I think CSS Display should say that, when a box is blockified, if its inner display type is layout-internal, then it becomes flow or flow-root.

@Loirooriol
Copy link
Contributor Author

And similar for inlinifications. That's only a theoretical problem because as far as I know they only happen in ruby, and unlike flexbox, ruby says they happen after anonymous-box fixup. But CSS Display should give a proper definition.

@tabatkins tabatkins added the css-display-3 Current Work label May 9, 2017
@tabatkins
Copy link
Member

I think the right thing to add is:

If the box originally had a [=layout-internal=] display type,
then its [=inner display type=] is also set to ''flow''.

wdyt, @fantasai?

@tabatkins
Copy link
Member

@fantasai approved this in person 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-display-3 Current Work Tracked in DoC
Projects
None yet
Development

No branches or pull requests

3 participants