Closed Bug 1920160 Opened 2 months ago Closed 8 days ago

Absolutely positioned boxes should accept `align-self` and `justify-self`

Categories

(Core :: Layout: Positioned, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
134 Branch
Tracking Status
firefox134 --- fixed

People

(Reporter: dshin, Assigned: dshin)

References

(Blocks 3 open bugs)

Details

(Keywords: dev-doc-needed, Whiteboard: [anchorpositioning:m1], [wptsync upstream])

Attachments

(7 files)

Both justify-self and align-self are accepted if the block is absolutely positioned, and have an impact on positioning of the absolutely positioned box within the containing block.

Relevant WPTs under /css/css-align/abspos.

Blocks anchor-center for anchor-positioning, which is a new value for alignment.

Blocks: 1909339
Severity: -- → S3
Assignee: nobody → dshin

The commits in bug 1269017 comment 50 may be useful to refer to.

See Also: → 1269017
Whiteboard: [anchorpositioning:m1]
Assignee: dshin → nobody
Assignee: nobody → dshin
Status: NEW → ASSIGNED

Current alignment spec 1 allows the margin-box of an absolutely
positioned elements to be aligned within the inset-reduced absolute
containing box, so just let the overconstrained margin be.

We no longer always fill the available space, which then may be aligned.

Depends on D226528

Absolutely positioned elements can be aligned, so it no longer
is grid-specific.

Depends on D226529

Also implement the alignment safety behaviour that is described as "in-between"
[1].

[1] https://drafts.csswg.org/css-position-3/#abspos-layout

Depends on D226530

Attachment #9432600 - Attachment description: Bug 1920160: Part 1 - Don't force overconstrained margins to ignore end-side margins. r=jwatt,#style → Bug 1920160: Part 1 - Don't force overconstrained margins to ignore end-side margins. r=#anchor-positioning-reviewers,#style
Attachment #9432601 - Attachment description: Bug 1920160: Part 2 - Document old inset behaviour vs spec behaviour. r=jwatt,#style → Bug 1920160: Part 2 - Document old inset behaviour vs spec behaviour. r=#anchor-positioning-reviewers,#style
Attachment #9432602 - Attachment description: Bug 1920160: Part 3 - Don't forcefully stretch size of absolutely-positioned boxes. r=jwatt,#style → Bug 1920160: Part 3 - Don't forcefully stretch size of absolutely-positioned boxes. r=#anchor-positioning-reviewers,#style
Attachment #9432603 - Attachment description: Bug 1920160: Part 4 - Move `CSSAlignmentForAbsPosChild` to `nsContainerFrame`. r=jwatt,#style → Bug 1920160: Part 4 - Move `CSSAlignmentForAbsPosChild` to `nsContainerFrame`. r=#anchor-positioning-reviewers,#style
Attachment #9432604 - Attachment description: Bug 1920160: Part 5 - Align boxes when within non-auto inset absolute containing block. r=jwatt,#style → Bug 1920160: Part 5 - Align boxes when within non-auto inset absolute containing block. r=#anchor-positioning-reviewers,#style
Attachment #9432605 - Attachment description: Bug 1920160: Part 6 - Separate out computation of auto sizes in abs-positioned boxes. r=jwatt,#style → Bug 1920160: Part 6 - Separate out computation of auto sizes in abs-positioned boxes. r=#anchor-positioning-reviewers,#style
Attachment #9432606 - Attachment description: Bug 1920160: Part 7 - Adjust test expectations. r=jwatt,#style → Bug 1920160: Part 7 - Adjust test expectations. r=#anchor-positioning-reviewers,#style
Blocks: 1927861
Pushed by dshin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/71d051b7857a Part 1 - Don't force overconstrained margins to ignore end-side margins. r=jwatt,firefox-style-system-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/26f7d594f6e0 Part 2 - Document old inset behaviour vs spec behaviour. r=firefox-style-system-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/b64bfe84e60a Part 3 - Don't forcefully stretch size of absolutely-positioned boxes. r=jwatt,firefox-style-system-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/45c61a69b9b8 Part 4 - Move `CSSAlignmentForAbsPosChild` to `nsContainerFrame`. r=jwatt,firefox-style-system-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/8bfb6f9eab80 Part 5 - Align boxes when within non-auto inset absolute containing block. r=jwatt https://hg.mozilla.org/integration/autoland/rev/d57f1f6f293b Part 6 - Separate out computation of auto sizes in abs-positioned boxes. r=jwatt https://hg.mozilla.org/integration/autoland/rev/5d57a3a8d6aa Part 7 - Adjust test expectations. r=jwatt
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/48964 for changes under testing/web-platform/tests
Whiteboard: [anchorpositioning:m1] → [anchorpositioning:m1], [wptsync upstream]

Backed out for causing mochitests plain failures in test_videocontrols_vtt.html.

Flags: needinfo?(dshin)
Upstream PR was closed without merging
Pushed by dshin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a3ad6717aaae Part 1 - Don't force overconstrained margins to ignore end-side margins. r=jwatt,firefox-style-system-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/7ace177238e5 Part 2 - Document old inset behaviour vs spec behaviour. r=firefox-style-system-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/38477a6f686b Part 3 - Don't forcefully stretch size of absolutely-positioned boxes. r=jwatt,firefox-style-system-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/fb9a3ecfa29e Part 4 - Move `CSSAlignmentForAbsPosChild` to `nsContainerFrame`. r=jwatt,firefox-style-system-reviewers,emilio https://hg.mozilla.org/integration/autoland/rev/783644509e3c Part 5 - Align boxes when within non-auto inset absolute containing block. r=jwatt https://hg.mozilla.org/integration/autoland/rev/8aa12043a1d7 Part 6 - Separate out computation of auto sizes in abs-positioned boxes. r=jwatt https://hg.mozilla.org/integration/autoland/rev/889105cc0018 Part 7 - Adjust test expectations. r=jwatt
Flags: needinfo?(dshin)
Upstream PR merged by moz-wptsync-bot
Regressions: 1930427
Keywords: dev-doc-needed
Regressions: 1930561
Type: defect → enhancement
Regressions: 1930850

place-self: auto should behave as normal when determining the actual position of an abspos, see https://github.com/w3c/csswg-drafts/issues/11197

:Oriol, that looks like bug 1930561 - and you're right, we mistakenly look at parent's (justify|align|place)-items for positioning absolute frames. Fix is landing soon.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: