w3c / w3c/csswg-drafts

[css-tables] percent width cells behave differently in nested tables

Open
#3,336 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

In the following, all engines agree that yellow and blue rectangles are in proportion to their contents' intrinsic widths and yellow's percent is ignored. But nothing in css-tables-3 (that I could find!) mentions this exception -- it would have yellow be 300 * (2000 / (2000 + 40)) px wide.

<table id="outerTable" style="width: 300px" cellspacing="0" cellpadding="0">
    <td style="background:red;">
        <table cellspacing="0" cellpadding="0">
            <td style="width:1%; background:yellow;" data-expected-width="100">
                <div style="width:20px; height:150px;"></div>
            </td>
        </table>
    </td>
    <td style="background:lightblue;" data-expected-width="200">
        <div style="width:40px; height:150px;"></div>
    </td>
</table>

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

Read the CSS Tables 3 width distribution algorithm linked in the issue, then compare it with the nested-table example and its data-expected-width values. Done means the specification explicitly accounts for the observed exception and the example’s expected widths are covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.