position-area: add behavioral subfeature for auto margins#29280
Merged
position-area: add behavioral subfeature for auto margins#29280
position-area: add behavioral subfeature for auto margins#29280Conversation
Issue: web-platform-dx/web-features#3558 Issue: w3c/csswg-drafts#10258 (comment) Issue: https://issues.chromium.org/issues/374574260#comment18 Issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1997481 Issue: https://bugzilla.mozilla.org/show_bug.cgi?id=2006398 Issue: https://bugs.webkit.org/show_bug.cgi?id=300823 References: https://developer.apple.com/documentation/safari-release-notes/safari-26_2-release-notes#:~:text=Fixed%20auto%20margins%20by%20converting%20them%20to%20zero%20when%20position%2Darea%20or%20anchor%2Dcenter%20is%20applied%20in%20CSS%20Anchor%20Positioning%2E%20%28162809291
Contributor
|
Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs). |
caugner
approved these changes
Mar 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A specification change to anchor positioning now requires that if a non-
noneposition-areaapplies to an element, thenmargin: autoandinset: autoto resolve to 0. This PR captures support for this behavior in a behavior subfeature.Test results and supporting details
Spec
The spec text is this bullet point:
It followed w3c/csswg-drafts#10258 (comment).
Chrome
According to bug 374574260 (comment #18) Chrome appears to have supported this behavior—or something close it—in its initial anchor positioning implementation. Then the spec changed twice, bringing back this original behavior.
Firefox
The actual support for this comes out of Firefox bug 1997481, though the changes to make the test pass came about in Firefox bug 2006398.
Safari
WebKit bug 300823 tracks this; it was fixed by WebKit/WebKit#52419. I determined the version number where it ultimately shipped from the Safari 26.2 Release Notes.
Related issues
position-anchor: capture change in initial value #29272