Intent to Implement: visibility:collapse for table rows

80 views
Skip to first unread message

David Grogan

unread,
Jun 22, 2017, 3:05:08 PM6/22/17
to blink-dev
joy...@google.com,dgrogan@chromium.org https://drafts.csswg.org/css-tables-3/#visible-track visibility:collapse is supposed to hide table rows while preserving their contribution to column widths. Right now Blink treats visibility:collapse as visibility:hidden, which merely skips painting the rows, leaving blank space instead of allowing the space to be used for other content.
This property allows developers to hide rows in a non-visually-jarring manner. Without this change developers can use display:none, but switching between display:table-row and display:none can cause column widths to change, causing a jarring effect as column widths change and affected cells are re-laid out. Firefox: Shipped Edge: Shipped Safari: Mixed public signals (patch posted in 2007 but no movement since) Web developers: Positive
Edge and Firefox are interoperable for the common case but differ when rowspan cells are affected. See https://bugs.chromium.org/p/chromium/issues/detail?id=174167#c35 for examples. Edge implements the CSS2.1 behavior. That's what we'll strive for as well, returning to the csswg if implementation turns out to be too hard. Some sites may be using visibility:collapse when they really want visibility:hidden, relying on the fact that Blink and WebKit render them the same. But these sites would render differently in Edge and FF, so this would mostly affect WebKit/Blink-only sites. If the new behavior is unwanted, the fix is simple: change "visibility:collapse" to "visibility:hidden", which is what they meant from the start.
None Yes None yet - the technical bug is https://crbug.com/174167 https://www.chromestatus.com/features/5684392546533376 No

PhistucK

unread,
Jun 22, 2017, 4:05:37 PM6/22/17
to David Grogan, blink-dev
Can you search the internal index (or whatever) for websites that use this where implementing this would affect their rendering?
Is it possible to use-count it in advance?


PhistucK

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOZbSt2UpNVD8Mvn4ocMw8gm%3DeTEXz4sCwTPcZNjHUbs8mrHWw%40mail.gmail.com.

Joy Yu

unread,
Aug 4, 2017, 5:47:34 PM8/4/17
to PhistucK, David Grogan, blink-dev
Hi! I did a basic usage study and it seems like most websites use visibility:collapse on non-table elements, so correctly implementing visibility:collapse for tables shouldn't have much negative effect :)

PhistucK

unread,
Aug 4, 2017, 5:56:37 PM8/4/17
to Joy Yu, David Grogan, blink-dev
HTTPArchive only includes homepages of website. Homepages are not likely to have tables, so I would not exactly call it a representative corpus for this feature. :(


PhistucK

Joy Yu

unread,
Aug 7, 2017, 2:45:21 PM8/7/17
to PhistucK, David Grogan, blink-dev
Hi! I updated the Google doc and updated the results with a Github search. In short, I found some cases of visibility:collapse applied on row/row groups, but they were mostly Firefox tests since Firefox supports visibility:collapse. Please let me know if you have any more questions or a better way to do a usage search! Thanks so much :)
Reply all
Reply to author
Forward
0 new messages