Open Bug 1871719 Opened 2 years ago Updated 1 month ago

Grid baseline-alignment doesn't take subgrid offsets (margin/border/padding/gap) into account

Categories

(Core :: Layout: Grid, defect)

defect

Tracking

()

ASSIGNED

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 7 open bugs)

Details

Attachments

(4 files)

Right now, we consider items-within-subgrids when doing baseline alignment in grids (as part of doing track sizing); but we end up dropping the baseline-aligned offsets of those items on the floor, per https://searchfox.org/mozilla-central/rev/05178ae3d8ed27d47b340094de52bd3f572a5e1d/layout/generic/nsGridContainerFrame.cpp#3744-3746 . So we effectively just start-align or end-align those ostensibly baseline-aligned grid items.

Bug 1833482 is fixing that by preserving those baseline-aligned offsets. However, it also reveals that we're not accounting for certain forms of padding when baseline-aligning those items (in particular: margin/border/padding/gap on the subgrid).

This bug here is about honoring these forms of padding when baseline-aligning grid items in a subgrid.

Depends on: 1833482
Attachment #9375510 - Attachment description: testcase 1 (border on subgrid) → testcase 1: border on subgrid

All 4 testcases here are expected to have ABCD be baseline-aligned, but they aren't (due to this bug) in Firefox Nightly right now.

(They are baseline-aligned in Chrome, though.)

I think this bug covers the same issue that's causing WPTs subgrid-baseline-005.html through subgrid-baseline-009.html to fail. --> Adding those bugs to dependency list.

This issue ("we're not accounting for..." in comment 0) is almost certainly responsible for our failure in https://wpt.fyi/results/css/css-grid/subgrid/align-self-baseline-with-subgrid-mbp.html as well.

That's tracked in bug 1883951 --> adding dependency.

Blocks: 1883951
Summary: Grid baseline-alignement doesn't take subgrid offsets (margin/border/padding/gap) into account → Grid baseline-alignment doesn't take subgrid offsets (margin/border/padding/gap) into account
See Also: → 1975291
Blocks: 1975297
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: