-
Notifications
You must be signed in to change notification settings - Fork 669
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-tables-3] Can we simplify empty-cells:hide? #605
Comments
I'm 100% sure that cells containing only collapsible white space need to be considered empty. This is especially important because the |
@fantasai That makes sense to me. When I wrote :empty I meant "does not contain any box at layout time", not "any node at dom time" (which the selector analogy incorrectly implied, sorry). One can indeed easily confirm that collapsed space does not count while uncollapsed space does not: The difference lies in the way out-of-flow elements are handled: |
Confused about cells with I guess Cells with And "row collapse" to cells with |
@cathiechen I am not sure I understood all your points correctly but
I agree. The fact is though that no browser does that with empty-cells either, it seems like we just need a resolution to remove this text from CSS 2.1 and move on. If we can agree on this, and I am confident we will, then
The spec text from css 2.1 is that "In the separated borders model, if the value of their 'empty-cells' property is 'hide' these "empty" cells are transparent through the cell, row, row group, column and column group backgrounds, letting the table background show through". But, no, visiblity:hidden should also hide the backgrounds defined on the
Yes. In browsers that support the CSS 2.1 text, cells affected by empty-cells:hide can also have visible content (position:absolute elements for instance) though the cell itself will be hidden. The property actually behaves like if the cells had a special visibility:hidden value set to them, that gets inherited as visible by their element/pseudo-element children (if any). The reason I am proposing (3) is that if we accept proposal (1) then there will be no content inside the cell that could be shown anyway, so the behavior will be strictly identical to If we decide that Chrome should match Edge and Firefox instead and hide cell backgrounds for cells that only contain absolutely positioned content, then I agree we need to keep some of the current text and cannot apply (3). Resolving positively on (1) and (2) is required in order to get to (3). |
@FremyCompany I think Firefox's behavior is more reasonable. e.g. We are agreed that "case 1" should show table background. As to "case 2", I think it should show
This behavior should be confirmed. From the perspective of |
I am not so sure how that is actually useful. The point is that we are going to need to sacrifice some things with tables because they cannot possibly work like the rest of css. What we are going to sacrifice is the question. I would argue having the backgrounds of the tr rendered on the cells instead of being clipped to the cells makes more sense because it then "sticks" to the cell, for instance if you transform it: https://wptest.center/#/ihhvr4 But that, really, is another question entirely. You are right it would be necessary to resolve this question first. If we want to render on the TR/TBODY/COL/COLGROUP and clip based on the table layout instead of letting each cell draw things for themselves, then we cannot merge empty-cells:hidden and visiblity:hidden either. |
Depends on #1657 |
:empy
like Chrome seems to be doing?The text was updated successfully, but these errors were encountered: