Closed Bug 1895193 Opened 2 years ago Closed 9 months ago

[Inactive CSS] self-alignment properties are active on absolutely positioned elements

Categories

(DevTools :: Inspector: Rules, task, P3)

task

Tracking

(firefox147 fixed)

RESOLVED FIXED
147 Branch
Tracking Status
firefox147 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

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

The self-alignment properties allow an absolutely-positioned element to align itself within the inset-modified containing block

Not sure if the element needs to have an anchor element though?

(In reply to Nicolas Chevobbe [:nchevobbe] from comment #0)

Not sure if the element needs to have an anchor element though?

If no anchor element is defined, there is no "default anchor box", which lets anchor-center behave like the center value. So technically it doesn't, though without anchor element, it falls back to center. I.e. it still has an effect and is therefore not inactive, though we might still show a hint explaining this.

Sebastian

Self-alignment WORKS on abspos regardless of anchor positioning:
https://drafts.csswg.org/css-align/#justify-self-property
https://drafts.csswg.org/css-align/#align-self-property

A hint mentioning anchor positioning would just confuse authors who are not using anchor positioning.

<!DOCTYPE html>
<div style="position: relative; width: 100px; height: 100px; border: solid">
  <div style="position: absolute; inset: 0; background: lime; place-self: center;">center!</div>
</div>
Priority: -- → P3
No longer blocks: 1895141
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/4e64d65b0b2e https://hg.mozilla.org/integration/autoland/rev/c277e6dde6c2 [devtools] Don't consider self alignment properties inactive for absolutely positioned elements. r=devtools-reviewers,fluent-reviewers,bolsson,ochameau
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 147 Branch
Regressions: 2004637
QA Whiteboard: [qa-triage-done-c148/b147]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: