Repository navigation
Treat a table cell's length width as a minimum in the auto table layout - #1345
Open
yangkx1024 wants to merge 1 commit into
Open
yangkx1024 wants to merge 1 commit into
yangkx1024 wants to merge 1 commit into
Conversation
yangkx1024
marked this pull request as ready for review
October 30, 2026 07:31
yangkx1024
added a commit
to yangkx1024/blitz
that referenced
this pull request
Oct 30, 2026
Making a column with a length width a `minmax(min-content, max-content)` track let cells spanning it widen it too, where browsers give a spanning cell's extra width to the other columns (WPT css/css-tables computing-row-measure-1, colspan-redistribution tables 18 and 25). The track now stays fixed, and before the grid runs it is widened to the largest min-content width of the cells that originate in it, as in the upstream pull request (DioxusLabs#1345). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In the auto table layout algorithm a column's length width (from a cell in the first row or a `<col>`) became a fixed grid track, so content wider than it overflowed into the next column. GitHub's notification mail, for example, heads a column `<th style="width: 24px">Status</th>`, and the word was painted over the next header. Browsers widen such a column to the min-content width of the cells that originate in it, and no further. Such a column now gets a `minmax(min-content, fit-content(<width>))` track, and its cells report the larger of their min-content width (measured without their own `width`) and the column's width as both of their intrinsic widths. The track therefore grows to fit those cells but not cells spanning it, which still widen the other columns rather than this one. A column with only spanning cells keeps its fixed track. The fixed table layout is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yangkx1024
force-pushed
the
table-cell-width-minimum
branch
from
October 30, 2026 07:57
582b5e5 to
2dce6b9
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the auto table layout, a column's length width (from a first-row cell or a
<col>) became a fixed grid track, so content wider than it overflowed into the next column. GitHub's notification emails head a column with<th style="width: 24px">Status</th>, and "Status" was painted over the next header.Browsers treat that width as a minimum. The column grows to the min-content width of the cells that originate in it, but not to their max-content width. Such a column now gets a
minmax(min-content, fit-content(<width>))track. Each of its single-column cells reports the larger of its min-content width and the column's width as both of its intrinsic widths. The min-content width is measured withSizingMode::ContentSize, because the cell's ownwidthwould otherwise fix the measurement. So the track grows to fit those cells, but cells spanning it still push their extra width into the other columns, since taffy caps growth past the limit at thefit-content()argument. A column with only spanning cells keeps its fixed track. The fixed table layout is unchanged.Locally, WPT
css/css-tableshas 9 more subtests passing and none newly failing (column-widths.htmltables 5, 8, 17 and 29;colspan-redistribution.htmltable 10;column-track-merging.htmltable 11; table 3 of both quirks tests), andfixed-layout-2.htmlnow passes. An earlier version that made these columnsminmax(min-content, max-content)tracks gained a few morecolspan-redistributioncases but broke three others, because spanning cells then widened the constrained column too.#1019 removes
SizingMode, which the measurement here relies on, and #1004 also changes how column widths are collected, so whichever of these lands later will need a small rebase.WPT results
Subtests: 71 newly passing, 440 newly failing (net -369). Tests: 96 added, 408 removed. Timeouts: -2.
Subtest changes by area (93 areas)
Full diff (524 changed tests)
Generated by the WPT workflow.