w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.46k stars 657 forks source link

[css-tables-3] Apparent "min-content width" inconsistency #1366

Closed gorgoglionemeister closed 7 years ago

gorgoglionemeister commented 7 years ago

https://drafts.csswg.org/css-tables-3/#computing-cell-measures

To get the min-content width of a column, we need to get the outer min-content width of each table cell of the column first, which, in turn, requires the min-content width of the column.

Am I wrong or is there something wrong in the spec? I can't not understand.

FremyCompany commented 7 years ago

The outer min-content width of a cell doesn't depend on the column. It's its own (inner) min-content width (the size needed for its content) plus its padding and border contribution (intrinsic cell offsets).

So, yes, to compute the min-content width of a column, you need the outer min-content width of each of its cells, but computing those shouldn't involve the column size anyhow.

You also need the outer min-content width of the column itself which is just the width specified on the table-column element (or its min-width if bigger). Maybe that name isn't very clear, it just mirrors the one used for cells due to the similarity of the formula. These names are from an older spec, but I am not sure what other name use if we find them confusing. Any proposal?

Another option is to remove the name and just inline the formulas in the next section in the case of column and column groups; they are used exactly once each so that would be possible.

FremyCompany commented 7 years ago

Was also clarified as part of #1687.

I clarified in the text exactly when I meant "column" and when I meant "its corresponding table-column" or the cells themselves.