Skip to content

[css-tables] Tables Fixup to-be-caused by replaced elements ignored in some browsers #398

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
FremyCompany opened this issue Aug 10, 2016 · 1 comment
Labels
css-tables-3 Current Work

Comments

@FremyCompany
Copy link
Contributor

FremyCompany commented Aug 10, 2016

https://drafts.csswg.org/css-tables-3/#fixupAlgo --- step 3.1:

An anonymous table or inline-table box must be generated around each sequence of consecutive proper table child box which are misparented. If the box’s parent is an inline box, then an inline-table box must be generated; otherwise it must be a table box.

A table-column box is misparented if its parent is neither a table-column-group box nor a table-root box.

This is what Edge does in the following example, but not what (most?) other browsers do:

https://jsfiddle.net/5cxwaopc/

I also see that all browsers seems to ignore display:table-column on the input, which is in direct contradiction with what CSS 2.2 stated (I removed the text from css-tables-3 because this clarification was not required as it is the normal expected behavior)

Replaced elements with these 'display' values are treated as their given display types during layout. For example, an image that is set to 'display: table-cell' will fill the available cell space, and its dimensions might contribute towards the table sizing algorithms, as with an ordinary cell.

Elements with 'display' set to 'table-column' or 'table-column-group' are not rendered (exactly as if they had 'display: none'.

What do we want to resolve this issue to? Here are two options:

  • (1) Browsers should fix the bugs. No changes to the spec required. There is a minor compatibility risk as the second input would disappear in this case (table-column ~= display:none).

  • (2) We want to ignore display:table-* on replaced elements if their parent is not display:table|inline-table. We can mention this as an effect similar to the blockification of flex/grid which happens before tables fixup.

Opinions?

@FremyCompany FremyCompany added the css-tables-3 Current Work label Aug 10, 2016
@FremyCompany FremyCompany self-assigned this Aug 10, 2016
@FremyCompany
Copy link
Contributor Author

Follow up: for the <button> tag, Edge does apply table-column as intended by the spec, but not the other browsers. See https://jsfiddle.net/p24k4q54/. I can almost sense a common theme here ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-tables-3 Current Work
Projects
None yet
Development

No branches or pull requests

1 participant