This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 30075 - Visibility: collapse should cause a recalculation on affected rows with rowspan and affected columns with colspan (as applicable)
Summary: Visibility: collapse should cause a recalculation on affected rows with rowsp...
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: CSS Level 2 (show other bugs)
Version: unspecified
Hardware: All All
: P2 minor
Target Milestone: ---
Assignee: Bert Bos
QA Contact: public-css-bugzilla
URL: https://www.w3.org/TR/CSS22/tables.ht...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-17 10:50 UTC by brunoais
Modified: 2017-03-17 10:51 UTC (History)
2 users (show)

See Also:


Attachments

Description brunoais 2017-03-17 10:50:58 UTC
Currently, with <tr>,
(source: https://www.w3.org/TR/CSS22/tables.html#dynamic-effects )
When a <tr> has the CSS rule and a <td> has rowspan, the contents are supposed to be clipped.
E.g.:
For a table like this:
+--------+-------+
|  grp1  | info1 |
|        +-------+
|        | info2 |
|        +-------+
|        | info3 |
+--------+-------+
|        | info4 |
|        +-------+
|  grp2  | info5 |
|        +-------+
|        | info6 |
+--------+-------+
|        | info7 |
|        +-------+
|        | info8 |
|        +-------+
|  grp3  | info9 |
+--------+-------+

grp1 is vertically-aligned to the top
grp2 is vertically-aligned to the middle
grp3 is vertically-aligned to the bottom

## According to the spec, for each of the below changes:

"visibility:collapse" the first row of each span group, and it should become like this:

+--------+-------+
|        | info2 |
|        +-------+
|        | info3 |
+--------+-------+
|  grp2  | info5 |
|        +-------+
|        | info6 |
+--------+-------+
|        | info8 |
|        +-------+
|  grp3  | info9 |
+--------+-------+

"visibility:collapse" the second row of each span group, and it should become like this:
+--------+-------+
|  grp1  | info1 |
|        +-------+
|        | info3 |
+--------+-------+
|        | info4 |
|        +-------+
|        | info6 |
+--------+-------+
|        | info7 |
|        +-------+
|  grp3  | info9 |
+--------+-------+

"visibility:collapse" the 3rd row of each span group, and it should become like this:
+--------+-------+
|  grp1  | info1 |
|        +-------+
|        | info2 |
+--------+-------+
|        | info4 |
|        +-------+
|  grp2  | info5 |
+--------+-------+
|        | info7 |
|        +-------+
|        | info8 |
+--------+-------+


Issues:

When working with text in tables, it can end up become unnecessarily clipped out when a row is hidden.
Just see what happens above when the row where the text is is collapsed. There's still a lot of space available but the text just doesn't appear there because it was clipped out.

Suggestion:

When "visibility:collapsed" is applied to a row:
1: The cells' rowspan that span through the affected row will have their rowspan value deducted by 1.
2: All "blocks" inside cells that have had rowspan deducted and have rowspan over 0 will be repositioned inside the cell according to vertical-align property. The cell should not change size to accommodate the content. All content that does not fit the cell just by repositioning it should be clipped.

For the above, the same ideology applies to columns.



"visibility:collapse" the first row of each span group, and it should become like this:

+--------+-------+
|  grp1  | info2 |
|        +-------+
|        | info3 |
+--------+-------+
|        | info5 |
|  grp2  +-------+
|        | info6 |
+--------+-------+
|        | info8 |
|        +-------+
|  grp3  | info9 |
+--------+-------+

"visibility:collapse" the second row of each span group, and it should become like this:
+--------+-------+
|  grp1  | info1 |
|        +-------+
|        | info3 |
+--------+-------+
|        | info4 |
|  grp2  +-------+
|        | info6 |
+--------+-------+
|        | info7 |
|        +-------+
|  grp3  | info9 |
+--------+-------+

"visibility:collapse" the 3rd row of each span group, and it should become like this:
+--------+-------+
|  grp1  | info1 |
|        +-------+
|        | info2 |
+--------+-------+
|        | info4 |
|  grp2  +-------+
|        | info5 |
+--------+-------+
|        | info7 |
|        +-------+
|  grp3  | info8 |
+--------+-------+


Any Reasons why this is a bad idea or this won't work?