Re: [csswg-drafts] [css-tables] Display: sub-row (#5316)

I realize that this would probably need to apply to all cells within a column collectively, so maybe this should work (only) with elements that otherwise have `display: table-column` or `table-column-group`.

~~~~css
col.note {display: table-column-runin;}
~~~~

Dunno.

<!--
| A | B | C | Comment / Notes |
|---|---|---|---|
| 1 | 2 | 3 | this is `display: table-subrow` with very long content |
| 4 | `rowspan=2` 5 | 6 | this is also `display: table-subrow` with very long content |
| 7 | " | 8 | and a final `display: table-subrow` |
| 9 | 10 | 11 | no comment |

<table><thead>
<tr><th>A<th>B<th>C</tr>
<tr><th colspan=3>Comment / Notes</tr>
</thead><tbody>
<tr><td>1<td>2<td>3</tr><tr><td colspan=3>this is <code>display: table-subrow</code> with very long content</tr>
<tr><td>4<td><code>rowspan=2</code> 5<td>6</tr><tr><td colspan=3>this is also <code>display: table-subrow</code> with very long content</tr>
<tr><td>7<td>"<td>8</tr><tr><td colspan=3>and a final <code>display: table-subrow</code></tr>
<tr><td>9<td>10<td>11</tr><tr><td colspan=3>no comment</tr>
</tbody></table>
-->
In #11499 I suggested that it might be necessary to represent HTML attributes `colspan` and `rowspan` by CSS properties, e.g. like this:

~~~~css
td, th {
  display: table-cell; 
  table-span: attr(rowspan type(<integer>), 1) attr(colspan type(<integer>), 1);
}
~~~~
Then it could be possible to solve this use case by other means:
~~~~css
td.note, th.note,
col.note || :is(th, td) {
  table-slot: 1 new-row-after;
  table-span: all-remaining-cols 1;
}
~~~~
<!--
thead {counter-reset: cols;}
thead > tr:first-child > * {counter-increment: cols attr(colspan type(<integer>), 1);}
--cols: value(counter(cols, decimal) type(<integer>), sibling-count() /* should be slot-count()*/); /* something like that*/
  table-span: var(--cols);
-->


-- 
GitHub Notification of comment by Crissov
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5316#issuecomment-2608173827 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 22 January 2025 20:12:49 UTC