[Inactive CSS] self-alignment properties are active on absolutely positioned elements
Categories
(DevTools :: Inspector: Rules, task, P3)
Tracking
(firefox147 fixed)
| 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?
| Assignee | ||
Updated•2 years ago
|
Comment 1•1 year ago
|
||
(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
Comment 2•1 year ago
|
||
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>
Updated•10 months ago
|
| Assignee | ||
Comment 3•9 months ago
|
||
Updated•9 months ago
|
Comment 5•9 months ago
|
||
| bugherder | ||
Updated•9 months ago
|
Description
•