[css-grid] Include grid item's margins and grid container's padding in the grid container's overflow area
Categories
(Core :: Layout: Grid, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox91 | --- | fixed |
People
(Reporter: MatsPalmgren_bugz, Assigned: TYLin)
References
(Regressed 1 open bug)
Details
(Keywords: testcase)
Attachments
(5 files, 2 obsolete files)
I haven't check the specs yet, but our rendering differs to Chrome
in both the grid and flexbox cases...
| Reporter | ||
Comment 1•6 years ago
|
||
Daniel, can you take a look at the flexbox case?
| Reporter | ||
Comment 2•6 years ago
|
||
(slightly clearer version)
| Reporter | ||
Comment 3•6 years ago
|
||
Oh, nice... :(
https://drafts.csswg.org/css-overflow-3/#scrollable
"The UA may additionally include the margin areas of boxes for which it is the containing block.
The conditions under which such margin areas are included is undefined in this level.
ISSUE 6. This needs further testing and investigation; is therefore deferred in this draft."
| Reporter | ||
Updated•6 years ago
|
| Reporter | ||
Comment 4•6 years ago
|
||
I'm guessing that the rendering in Chrome makes sense to authors,
since it's compatible with block layout at least for this trivial
example. I guess we'll have to reverse-engineer what they are
doing if we want to be compatible... Sigh.
| Reporter | ||
Comment 5•6 years ago
|
||
Slightly more complex test for grid/flex layout.
It looks like Chrome is using the margin-boxes of children when calculating the overflow.
| Reporter | ||
Comment 6•6 years ago
|
||
Does anyone have an opinion about the spec issue (cited in comment 3)?
Otherwise, I'm leaning towards proposing to the CSSWG that we resolve
in favor of using margin-boxes.
Comment 7•6 years ago
|
||
I don't have a strong opinion.
| Reporter | ||
Comment 8•6 years ago
|
||
Some background about this: we intentionally included margins in bug 665597
and then reverted that partially in bug 724352 and eventually backed it out
in bug 750293 due to regressions. The part that did survive lives in
nsBlockFrame::ComputeFinalSize in the form of 'blockEndEdgeOfChildren'
which we propagate to ConsiderBlockEndEdgeOfChildren for inclusion into
the overflow area. So it appears that we only include the block-end margin,
but maybe only in some cases? - I haven't looked at the details yet...
I'll try to file a spec issue to sort this out unless there is one already.
| Assignee | ||
Comment 9•6 years ago
|
||
bug 1487927 is about the block-end margin rendering difference on columns.
| Reporter | ||
Comment 10•6 years ago
|
||
| Reporter | ||
Comment 11•6 years ago
|
||
| Reporter | ||
Comment 12•6 years ago
|
||
Filed spec issue: https://github.com/w3c/csswg-drafts/issues/3653
Comment 13•5 years ago
|
||
Fwiw spec issue concluded that margins/padding of flex/grid layout should always be included in scrollable overflow. (It's what authors expect, and as long as we're not constrained by webcompat, we should make it work as expected.)
Comment 14•5 years ago
|
||
Pushed testcases for Flex in https://github.com/web-platform-tests/wpt/pull/23445
| Assignee | ||
Comment 15•4 years ago
|
||
I morph this bug into adding grid item's margins and grid container's padding in the grid container's overflow area because there are some sample tests for grid in this bug. Flexbox is handling in bug 1697349.
| Assignee | ||
Comment 16•4 years ago
|
||
Relevant tests on WPT:
http://wpt.live/css/css-grid/grid-model/grid-overflow-padding-001.html
http://wpt.live/css/css-grid/grid-model/grid-overflow-padding-002.html
http://wpt.live/css/css-grid/grid-model/grid-areas-overflowing-grid-container-001.html
http://wpt.live/css/css-grid/grid-model/grid-areas-overflowing-grid-container-002.html
http://wpt.live/css/css-grid/grid-model/grid-areas-overflowing-grid-container-003.html
...
Per offline chat with Ian, blink has implemented this new behavior in LayoutNG Grid. It can be enabled via command flag --enable-blink-features=LayoutNGGrid or go to URL chrome://flags/#enable-container-queries to turn it on.
| Assignee | ||
Comment 17•4 years ago
|
||
| Assignee | ||
Comment 18•4 years ago
|
||
This patch updated the grid container's scrollable overflow areas to
match the spec. This also fixed Bug 1532383 - include space in empty
explicit grid tracks in the scrollable overflow area.
Depends on D111994
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 20•4 years ago
|
||
Comment 21•4 years ago
|
||
Backed out 2 changesets (bug 1527539) for WPT failures in /css/css-grid/alignment/grid-content-alignment-overflow-002.html. CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer?job_id=341723159&repo=autoland&lineNumber=2879
Push with failures:
https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&revision=3cac3147fcd551b1e394647ecd724bb688a2a03e
Backout:
https://hg.mozilla.org/integration/autoland/rev/eb306ed24a7b50e3f20eec6eba7594dec0af6078
Comment 22•4 years ago
|
||
| Assignee | ||
Updated•4 years ago
|
Comment 24•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/05e001cd9117
https://hg.mozilla.org/mozilla-central/rev/adc96c7ed268
Description
•