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-tables-3] Do table captions participate in BFC or TFC? #1189

Closed
Loirooriol opened this issue Apr 8, 2017 · 7 comments
Closed
Labels
Closed Accepted as Obvious Bugfix Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-display-3 Current Work Tracked in DoC

Comments

@Loirooriol
Copy link
Contributor

Loirooriol commented Apr 8, 2017

From CSS Display,

The element generates a principal table wrapper box containing an additionally-generated table box, and establishes a table formatting context.

It's not much clear if what establishes the TFC is the table wrapper box. The sentence sounds like it's the element, but I believe formatting contexts established in the box tree, not the element tree. So probably it's the table wrapper box or the table box.

CSS Tables 3 and CSS 2.1 are more clear:

The table wrapper box establishes a block formatting context.

I think this means that both the table box and the caption participate in a BFC.

However, CSS Display says

table-row-group, table-header-group, table-footer-group, table-row, table-cell, table-column-group, table-column, table-caption
The element is an internal table element, and participates in a table layout context.

Which is it, does the caption participate in a BFC or in a TFC? What establishes the TFC, the table wrapper box or the table box?

Since captions can't exist outside a table wrapper box (they generate an anonymous one if necessary), I think they should participate in a TFC, which would be established by the table wrapper box.

@FremyCompany
Copy link
Contributor

You can't get a float to invade captions in any browser as far as I can remember. So that would be the table wrapper box.

But then again I still do not believe this wrapper-box mumbo-jumbo has any actual usefulness and the concept should just be removed. That would make both sentences actually valid in this case. The table wrapper box would be equal to the table box and would be a formatting context, and table-caption would participate in that formatting context.

@Loirooriol
Copy link
Contributor Author

If you can rewrite the CSS Table spec without the table wrapper box oddity, it would be great. Thanks!

@fantasai fantasai added the css-display-3 Current Work label Apr 18, 2017
@fantasai
Copy link
Collaborator

This is a bug in Display.

@FremyCompany
Copy link
Contributor

Only if you commit to the existence of the table wrapper box. No browser behaves like if there was one in this case. And it is not the only example, there is an almost infinite stream of those. The concept is just buggy.

But, to be fair, in the absence of a resolution to remove the concept, the bug is in CSS Display and in all browsers.

@fantasai
Copy link
Collaborator

We've fixed the errors in Display to be consistent with the model in CSS2.1. Please let us know if there is any remaining incorrectness.

@Loirooriol
Copy link
Contributor Author

Yes, now it's consistent with CSS 2.1 and CSS tables. But if Fremy is going to change this in CSS tables because it's not consistent with implementations, maybe you could add a note warning about the possible change?

@tabatkins
Copy link
Member

When/if he convinces the group this is possible and desirable, we'll change it. In the meantime, @fantasai and I are pretty against it. ^_^

@tabatkins tabatkins added Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. and removed Commenter Response Pending labels May 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted as Obvious Bugfix 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

4 participants