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] run-in fixup should create inline-block when parent inlinifies #1607

Closed
Loirooriol opened this issue Jul 15, 2017 · 5 comments
Closed

Comments

@Loirooriol
Copy link
Contributor

Loirooriol commented Jul 15, 2017

This is like #1590 but for run-in instead of tables. CSS Display says

an anonymous block box is generated around the run-in sequence

But I guess this block box should be an inline-level block container if the parent inlinifies, e.g. inside internal ruby boxes or inside another run-in with a flow inner display type. Maybe it would be better to be consistent with table fixup and also generate an inline-block inside non-run-in inline boxes.

Alternatively, in these cases the wrapper could be an inline box, or generate no wrapper.

@tabatkins tabatkins added the css-display-3 Current Work label Jul 17, 2017
@fantasai
Copy link
Collaborator

Inlinification happens before run-in fixup, so I don't understand why this is an issue.

@Loirooriol
Copy link
Contributor Author

@fantasai So the problem is that inlinification happens first, then run-in fixup creates a block box, and then you end up with a block box inside a ruby or an inline run-in, which do not tolerate block boxes inside them. It's a violation of this principle:

If an inline flow box is inlinified, it recursively inlinifies all of its in-flow children, so that no block-level descendants break up the inline formatting context in which it participates.

@Loirooriol
Copy link
Contributor Author

Well, I guess this is not really a problem right now, because if an ancestor inlinifies, the run-in will become a normal inline.

But I can image some future spec that makes some block boxes inlinify their contents without establishing a BFC. Then, one could have a run-in just before such a block, the run-in wouldn't be inlinified, it would be reparented inside the block, and then generate an anonymous block. But the element-generated block inlinifies its contents, so it doesn't tolerate the anonymous block child.

@fantasai
Copy link
Collaborator

@Loirooriol That seems like a very hypothetical situation and I can't even imagine why it would occur. If it does, though, we can adjust all the specs as necessary--they are not frozen for all time, just stabilized under current conditions.

@Loirooriol
Copy link
Contributor Author

OK, I just thought it could be good to make it clear that run-in layout does not violate this guideline:

Boxes which inlinify their contents can’t directly contain block-level boxes; any boxes generated within such an element must be inline-level.

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