Open Bug 1461852 Opened 6 years ago Updated 7 days ago

Firefox honors small heights on <td> (for sizing of that <td> and percent resolution on children), unlike other browsers

Categories

(Core :: Layout: Tables, enhancement, P3)

enhancement

Tracking

()

Webcompat Priority P2

People

(Reporter: emilio, Unassigned, NeedInfo)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Keywords: webcompat:platform-bug, Whiteboard: DUPEME)

Attachments

(2 files)

      No description provided.
Attached file testcase
It's not clear to me what's the right behavior here... Slightly related to bug 1421660.
See Also: → 1421660
The right behavior is for the CSS WG to get off its behind and spec tables?  ;)
Priority: -- → P3
Clarifying summary -- all browsers *do* resolve percent heights against in <td> against that <td>, it seems (as shown in attached testcase 2, which has 2 rows with 50%-height-child in each row).

The key difference is whether or not they honor a tiny height **on the <td>**.  Firefox does honor the tiny cell height (and uses it for percent resolution).  In contrast, other browsers (Chrome/Safari/Edge) seem to use the cell's content-box as a lower-bound on the cell's height (so, they have a nonzero-height green box for each table cell) -- and then, they resolve percentages against that cell height.

So, it seems everyone agrees on resolving percentages against the cell height -- it's just a disagreement on how to determine the cell height.
Summary: Percentage heights in children of <td> are resolved against that <td>, unlike other browsers. → Firefox honors small heights on <td> (for sizing of that <td> and percent resolutoin on children), unlike other browsers.
Summary: Firefox honors small heights on <td> (for sizing of that <td> and percent resolutoin on children), unlike other browsers. → Firefox honors small heights on <td> (for sizing of that <td> and percent resolution on children), unlike other browsers
The "other browsers" behavior of using a height on <td> to just set a minimum height for the row is the one the spec calls for.  Pretty sure we have existing bugs tracking that....
Whiteboard: DUPEME
A volunteer reported to me a broken site (https://www.shopback.com.tw/) which happened to be broken because of this.
Webcompat Priority: --- → ?
Webcompat Priority: ? → P2
Severity: normal → S3

This is breaking the layout at https://www.91mobiles.com/compare/realme/9+SE+5G/vs/Moto/G72-amp, as reported at https://webcompat.com/issues/117029 , causing all sorts of lapping content.

This is the key CSS:

#fixed-table tr {
  height: 1px;
}
#fixed-table tr td {
  height: inherit;
}
#fixed-table tr td .cmp-summary-box { // a div, only child of the td
  height: 100%;
}
Depends on: 1883699

Moving away the Site Breakage dependencies. Sorry for the bugspam, I'll only do one change per core bug for the next issue. :)

No longer blocks: 1446442, 1890794

This is still reproducible based on the test case on both Firefox Release and Nightly. (not reproducible on Chrome)

Environment:
Operating system: Windows 10
Browsers tested: Firefox Nightly 128.0a1 (2024-05-28) / Firefox Release 126 / Chrome 125.0.6422.113

I'm tentatively planning to look at this bug soon (if no one gets to it first). ni=me as a reminder.

Flags: needinfo?(dholbert)
Duplicate of this bug: 1542098
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: