Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
[css-tables] percentage resolution #474
Compat Issues: yes
During the first layout pass, they can be resolved to "auto" but it seems people rely on a webkit-behavior where height:100% resolves as 0px in the first layout pass if the box is overflow:scroll/auto. It doesn't work in Firefox, but the fix for Firefox is to set a default height on the cell, then the percentage resolved based on that height. Edge having none of the bugs, we have webcompat issues. We would like to settle on either having Chrome/Safari bug fixed or standardize it.
CSS 2.1 Option:
Browsers Passing Test:
I had some old testcases at http://dbaron.org/css/test/2006/percent-height-in-tables
Summary of the issue
Face to face recommendation
I'm working on a fix for https://bugs.chromium.org/p/chromium/issues/detail?id=964282 in LayoutNG (Blink's new layout engine), to match the old Blink layout engine. The patch is here: https://chromium-review.googlesource.com/c/chromium/src/+/1621166
The current wording in the spec seems to favor the WebKit/Blink behavior (well, almost).
BTW: The two testcases there don't have a pass condition, so I don't know what's expected.
The interesting detail here is when the cell/table has auto height (which the spec doesn't cover). In that case it doesn't really make a lot of sense to resolve a percentage height block with overflow scroll/auto to 0. Or does it?
@FremyCompany 's comment above, though, regarding an old F2F recommendation, seems to match exactly what Blink (the old engine) (and presumably WebKit) does (and my test should pass). Are we waiting for the spec to be edited?
@mstensho My understanding is that this case is covered by CSS 2, because in that specific case the computed value of the
I can add a note referring to this in the spec if that would make things clearer.
@mstensho I mean, technically the spec already covers this in the section just above, but I agree that it wouldn't hurt bringing this to attention right next to the relevant text:
I will make the clarification, as well as another one still in the queue, and ask for a new publication at next F2F just so the TR version also gets the updates.
Ok, I performed some content reordering and restructuring around that section. Here's how things look like now:
I added a link in the section you quoted:
which links to:
which is now its own section rather than an advisement in another section.