Closed Bug 2008537 Opened 2 months ago Closed 2 months ago

position-area should implicitly apply correct justify-self value

Categories

(Core :: Layout: Positioned, defect)

defect

Tracking

()

RESOLVED FIXED
148 Branch
Tracking Status
firefox147 --- fixed
firefox148 --- fixed

People

(Reporter: jakea, Assigned: jfkthame)

Details

(Keywords: dev-doc-complete, Whiteboard: [wptsync upstream] [anchorpositioning:continuation])

Attachments

(5 files)

Attached video Demo

https://codepen.io/jaffathecake/pen/bNVbQyp?editors=1100

Press the button to show the popover. It should not overflow the sides of the viewport.

https://drafts.csswg.org/css-anchor-position-1/#position-area-alignment

Marking as dev-doc-needed assuming https://github.com/mdn/browser-compat-data/pull/28761 lands and we should mark ourselves as no-longer-partial.

Keywords: dev-doc-needed

It looks like we do try to use the appropriate justify-self value (anchor-center) here, but what we fail to do is to treat it as a "safe" alignment by default.

Adding an explicit justify-self: anchor-center to the #footnote element fixes the behavior. But with the initial value of auto, although that gets resolved to anchor-center, the "raw" value being auto means that we skip the alignment fixup here.

A possible fix may be to exempt a resolved value of anchor-center from the condition here, as the "legacy behavior" that code wants to preserve won't be relevant to anchor-positioning anyhow.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED

This fails in current Nightly (without the patch here). It renders as expected in Chrome.

Whiteboard: [anchorpositioning:triage]
Pushed by jkew@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/326431509879 https://hg.mozilla.org/integration/autoland/rev/133b0f2e5db4 Use "safe" behavior by default when applying implicit anchor-center alignment. r=layout-anchor-positioning-reviewers,layout-reviewers,emilio,dshin https://github.com/mozilla-firefox/firefox/commit/819f2165c3c9 https://hg.mozilla.org/integration/autoland/rev/bea6b109a5e4 Add a simple reftest to confirm default anchor-center justification is 'safe'. r=layout-anchor-positioning-reviewers,emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/56992 for changes under testing/web-platform/tests
Whiteboard: [anchorpositioning:triage] → [anchorpositioning:triage], [wptsync upstream]
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 148 Branch
Upstream PR merged by moz-wptsync-bot
Whiteboard: [anchorpositioning:triage], [wptsync upstream] → [wptsync upstream]
Whiteboard: [wptsync upstream] → [wptsync upstream] [anchorpositioning:continuation]
QA Whiteboard: [qa-triage-done-c149/b148]
Attachment #9539536 - Flags: approval-mozilla-release?

This fails in current Nightly (without the patch here). It renders as expected in Chrome.

Original Revision: https://phabricator.services.mozilla.com/D277893

Attachment #9539537 - Flags: approval-mozilla-release?

Related issues and pull requests

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

Attachment

General

Created:
Updated:
Size: