-
Notifications
You must be signed in to change notification settings - Fork 642
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-contain-1] maybe 'contain-size' shouldn't apply to display:table-caption? #2952
Comments
Leaving out table-caption was intentional, as it is a block box, and as far as I can tell does not have any special rule that would make applying CSS2.1 claims:
Is it more special than the spec(s) lead me to believe? Setting an explicit width and height on a table caption, including setting them to smaller than the content and to 0, works just fine as it would on any block box, so I think we're good, but maybe I'm missing something. |
I think the issue is that in many cases the (I think this doesn't happen with |
Or, to put it another way, I don't think making this work for captions in particularly easier/harder than it is for table cells; it seems odd to allow one but not the other. That said, it's also not clear to me why this isn't allowed for cells. |
Because the effect would be something like setting the table cell's width and height to 0 (if they're not otherwise specified, or to what they're specified, if anything), then layout out the content of the cell without resizing it. That cannot be done today, as table cells are always enlarged to fit their in flow content, which never overflows, and the Unlike table cells, on table captions you can set a width and height, can cause overflow if you set them too small (or to 0). So if |
See #1791 |
I would like to close with no change. Agenda+ |
The CSS Working Group just discussed
The full IRC log of that discussion<dael> Topic: maybe 'contain-size' shouldn't apply to display:table-caption?<dael> github: https://github.com//issues/2952#issuecomment-415890334 <dael> florian: This was raised by dbaron because size containment is desc as not apply to table parts. Table caption is not a table part. It is intentional. <dael> florian: Table cells and the like need no size containment because general table layout you can't make it smaller then inflow content. trying to do so through containment wouldn't work unless we define how it works in terms of layout. Table caoptions do not have that limitation. No strong reason for it to have size containment not work <dael> florian: Therefore I propose close no change. <dael> astearns: Even if your reasoning is accepted I think there should be a note <dael> florian: Perfectly reasonable, yes. Thanks <dael> astearns: dbaron does it make sense to you? <dael> dbaron: I guess...I'm still not convinced table captions are that different in characteristics that matter <dael> florian: If you take a tbale cell with some content with widht 0 it won't have a 0 width. For a caption it will. That's what matters here <dael> dbaron: Table cell with div inside div can be 0. <dael> florian: On table cell yes <dael> dbaron: Interesting thing is how sizes interact rather then how sizes interact with content <dael> florian: Size containment changes how you find the size. How it influences things around doesn't change. <dael> dbaron: IN both cases you compute the size in a larger process. You're saying contain size means contents don't influencec size. <dael> florian: Yes you size as if empty, then layout content without changing that resolved size. <dael> florian: It is an undefined operation on table cells, defined on table captions. <dael> dbaron: I'm okay with that <dael> astearns: Objections to close with an explanation note in the spec and no change? <dael> RESOLVED: close with an explanation note in the spec and no change |
Marked as needs edits to add the note. |
The definition of
contain:size
says thatcontain:size
doesn't have an effect ontable
or on internal table elements. This means it doesn't apply todisplay:table-cell
... but it does apply todisplay:table-caption
, which isn't defined as an internal table element (to my surprise, and in disagreement with Gecko's code).I don't have a strong opinion here... and I just filed Mozilla bug 1478850... but it's possible the spec should change here?
The text was updated successfully, but these errors were encountered: