| Summary: | [margin-trim][block layout] self-collapsing children at block-end don't have nested content trimmed | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Sammy Gill <sgill26> |
| Component: | Layout and Rendering | Assignee: | Sammy Gill <sgill26> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | bfulgham, simon.fraser, webkit-bug-importer, zalan |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://github.com/web-platform-tests/wpt/pull/39674 | ||
| Bug Depends on: | 253610 | ||
| Bug Blocks: | 253454 | ||
Pull request: https://github.com/WebKit/WebKit/pull/12982 Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/39674 Committed 263439@main (809b95bb1a78): <https://commits.webkit.org/263439@main> Reviewed commits have been landed. Closing PR #12982 and removing active labels. |
If you have a block structure that is something similar to the following: <container> <item style="margin-bottom: 10px"></item> <item style="margin-bottom: 10px; height: 0px;"> <item style="margin-bottom: 10px; height: 0px;"> <item style="margin-bottom: 10px; height: 0px;"> <item style="margin-bottom: 10px; height: 0px;"></item> <item style="margin-bottom: 10px; height: 0px;"></item> </item> </item> </item> </container> We currently trim the last child, which is self collapsing, and its margins correctly, but none of the children nested within it are trimmed. Since these are at the block-end and we trim the margins that are collapsed through for the container, none of the inner margins end up participating in margin collapsing with the container's margin and renderings look correct. However, with the tests added as a part of 253610 we can actually see that these margins are not trimmed by looking at the computed style values.