w3c / w3c/csswg-drafts

Empty row-groups special treatment

Open
#5,772 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

css-tables-3
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

Empty row-groups are treated differently during layout. Spec does not mention this. The issues I've found are:

  1. When is row-group treated as empty?

Only row-groups with no children are treated as empty. Empty row child, or an abspos child, all trigger non-empty behavior.

  1. What is the size of an empty row-group?

external/wpt/css/css-tables/bounding-box-computation-3.html asserts that empty row-group should have width of 0

Chrome 87, FF 83, Safari 13 disagree, the row-group width matches other rows.
Pre-Chrome Edge has width of 0.

Suggestion: standardize empty row-group width to match table's grid, like other rows. This is prevalent implementation, and aligns with CSS behavior for empty blocks.

  1. border-spacing and empty row-groups?
    <table border-spacing:10px>
      <tbody></tbody>
      <tbody></tbody>
      <tbody><td>x</td></tbody>
    </table>

Chrome 87, Edge 17, Safari 13 do not generate border spacing for empty row groups. FF does.

What is the location of the first tbody? I believe its offsetTop should be 0 (no border spacing), but bounding-box-computation-3.html disagrees. It inserts border spacing before first row-group, even if it is empty. Unless all row-groups are empty, in which case there is no border-spacing.
Suggestion: empty row-groups should not generate any border spacing before or after ever.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with external/wpt/css/css-tables/bounding-box-computation-3.html and review its assertions for empty row-groups, widths, and border-spacing. Compare those expectations with the issue's reported browser behavior. Done means the CSS Tables specification clearly defines these cases and the relevant test reflects the agreed behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, html
Domain
documentation, frontend
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.