Closed Bug 1786910 Opened 3 years ago Closed 3 years ago

[css-flexbox][css-align] ignore align-content when determining static position of abspos flex children

Categories

(Core :: Layout: Flexbox, defect)

defect

Tracking

()

RESOLVED FIXED
107 Branch
Tracking Status
firefox-esr102 --- fixed
firefox105 --- wontfix
firefox106 --- fixed
firefox107 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Per https://github.com/w3c/csswg-drafts/issues/7596 , we should now ignore align-content when determining the static position of abspos flex children (and we should just use align-self).

(See bug 1784135 comment 0 for some additional background on what we do right now.)

Before this patch, we honored align-content (in combination with align-self)
for cross-axis alignment for abspos flex children in cases where the flex
container was multi-line
. This was a bit weird, but was required by the spec,
and made some sense in the spirit of aligning the abspos box as if it were the
sole flex item in a flex container.

Now the CSSWG has resolved in [1] to simplify things by just ignoring
align-content for abspos flex children. So, this patch updates us in accordance
with this change.

Before this commit, we had a bunch of WPT tests to check the impact of every
align-content value, with all of the various flavors of directionality. Now
that align-content has no effect in any of these cases, all of these tests
become pretty trivial and redundant. Rather than carrying them all forward
with trivial "no impact" expectations for each scenario, I've just updated the
first/simplest such test to expect no-behavioral-impact and I've removed the
rest.

[1] https://github.com/w3c/csswg-drafts/issues/7596#issuecomment-1225952646

Pushed by dholbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e2ea415fa03c Ignore 'align-content' when determining the aligned static position of abspos flex children. r=TYLin
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/35951 for changes under testing/web-platform/tests

Comment on attachment 9295105 [details]
Bug 1786910: Ignore 'align-content' when determining the aligned static position of abspos flex children. r?TYLin

Beta/Release Uplift Approval Request

  • User impact if declined: Minor webcompat behavior-difference persists between us & other browsers
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): small/targeted fix, which brings us into alignment with other browsers (& the updated spec).
  • String changes made/needed: None
  • Is Android affected?: Yes
Attachment #9295105 - Flags: approval-mozilla-beta?

This would be an opportunistic "safe" uplift to beta; not a huge deal either way if we take it or let it ride the trains. But given that we're at the very start of the release cycle, I tend to feel like we might as well uplift.

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 107 Branch
Upstream PR merged by moz-wptsync-bot

Comment on attachment 9295105 [details]
Bug 1786910: Ignore 'align-content' when determining the aligned static position of abspos flex children. r?TYLin

LGTM, approved for 106 beta 2, thanks.

Attachment #9295105 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Is this something we're going to want on ESR also? Go ahead and nominate if so; it grafts cleanly.

Flags: needinfo?(dholbert)
Flags: in-testsuite+

Comment on attachment 9295105 [details]
Bug 1786910: Ignore 'align-content' when determining the aligned static position of abspos flex children. r?TYLin

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Minor well-understood webcompat win (regarding alignment of absolutely positioned children of a flex container).
  • User impact if declined: Theoretical small Firefox-specific layout/alignment issues, due to this behavioral difference between Firefox and other browsers.
  • Fix Landed on Version: 107 (& uplifted to 106beta)
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Not risky,. Small patch, which simply makes us stop paying attention to a particular property (in this specific situation), bringing us into alignment with other browsers & the current spec.
Flags: needinfo?(dholbert)
Attachment #9295105 - Flags: approval-mozilla-esr102?

Comment on attachment 9295105 [details]
Bug 1786910: Ignore 'align-content' when determining the aligned static position of abspos flex children. r?TYLin

Simple fix for better spec alignment seems like a good idea this early in the ESR's lifecycle. Approved for 102.4esr.

Attachment #9295105 - Flags: approval-mozilla-esr102? → approval-mozilla-esr102+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: