table cells grow on resize when the table is a child of display grid
Categories
(Core :: Layout: Grid, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox75 | --- | fixed |
People
(Reporter: swalker, Assigned: emilio)
References
Details
(Keywords: testcase, Whiteboard: [layout:backlog:quality], [wptsync upstream])
Attachments
(4 files)
![]() |
||
Updated•7 years ago
|
Comment 1•7 years ago
|
||
Updated•7 years ago
|
Similar behaviour is observed when display:table is assigned to a child within an element with display:grid. If child has some margin applied, it vertically grows by the margin amount whenever any DOM Manipulation occurs.
Can be reproduced at JSFiddle - https://jsfiddle.net/12tjpcx3/15/
Observed on FF 66/Win 7.
I can corroborate that having a table with a non-zero margin as a child of an element with display: grid causes the unexpected padding on table cells.
Remove either of these conditions and tables appear as normal; For now I am simply removing the margins around my tables.
Related: https://bugzilla.mozilla.org/show_bug.cgi?id=1427148
Comment 7•6 years ago
|
||
Another demo: https://jsfiddle.net/4wcg6d7f/7/
Comment 8•6 years ago
|
||
Comment hidden (obsolete) |
Comment 10•6 years ago
|
||
(Ah, sorry - it looks like Josh's testcase shows a version of this bug after all. I was over-pivoting on the width growing/shrinking in the testcase and didn't notice the subtle vertical margin change. I'll go ahead and mark comment 9 as obsolete.)
Comment 11•6 years ago
|
||
Here's a reduced version of Josh's testcase, comparing table-in-a-grid (left) vs. table-in-a-block (right): https://jsfiddle.net/dholbert/64ge85kd/
Assignee | ||
Comment 12•6 years ago
|
||
This is happening in https://drafts.csswg.org/css-align/#overview too for example.
Assignee | ||
Updated•6 years ago
|
Comment 14•6 years ago
|
||
Also happening on https://w3c.github.io/ServiceWorker/#dom-serviceworkerregistration-onupdatefound when hovering the link "updatefound" per this Twitter thread: https://twitter.com/fantasai/status/1230029207591194624?s=20
Given the number of dupes, putting this as a candidate for our more near-term quality backlog.
Assignee | ||
Comment 15•6 years ago
|
||
Otherwise we do the wrong thing for incremental layout.
Updated•6 years ago
|
Updated•6 years ago
|
Comment 17•6 years ago
|
||
![]() |
||
Comment 20•6 years ago
|
||
bugherder |
Description
•