Implement `position-try-order` for anchor fallbacks.
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
People
(Reporter: dshin, Assigned: jfkthame)
References
(Blocks 3 open bugs, )
Details
(Keywords: dev-doc-complete, Whiteboard: [anchorpositioning:continuation], [wptsync upstream])
Attachments
(6 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-release+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-release+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-release+
|
Details | Review |
This property introduces a step where we compute inset-modified containing block of all fallbacks and sort fallbacks based on that. This implies resolution of all inset properties and position-area. Note that the grid area computed by position-area is considered IMCB, as per position-try-order-position-area.html.
InterOp 2025 WPT:
- position-try-order-basic.html
- position-try-order-position-area.html
| Reporter | ||
Comment 1•6 months ago
•
|
||
Naive implementation of this shouldn't be hard - We have everything we need to resolve these. Since @position-try can change the default anchor, this could get expensive, though.
Main work will be to factor out function for computation of IMCB, resolving inset and position-area properties (& associated anchor references, plus position-anchor), which then can be used as a comparator to sort the fallbacks.
Updated•6 months ago
|
Updated•5 months ago
|
Updated•4 months ago
|
Updated•3 months ago
|
Updated•3 months ago
|
Updated•3 months ago
|
Updated•3 months ago
|
Comment 2•3 months ago
|
||
Although this is 5 points of effort, per the interop-2025 bug, this would get us quite a few points if it fixes all of these:
- parsing/ (3 tests worth of points)
- property-interpolations.html
- position-try-order-basic.html
- position-try-order-position-area.html
Updated•3 months ago
|
| Assignee | ||
Comment 3•3 months ago
|
||
Updated•3 months ago
|
| Assignee | ||
Comment 4•3 months ago
|
||
This test seems questionable as written, because the anchored box fits at its "base" position
without overflowing the IMCB, and therefore there doesn't seem to be any justification for
applying fallbacks at all (see also https://github.com/w3c/csswg-drafts/issues/13268).
This patch forces fallbacks to be considered in all cases, by ensuring the base position always
overflows and then providing a fallback that matches the "original" (non-overflowing) base position;
then the browser will choose between this and the flipped fallback according to the specified
position-try-order and writing modes involved.
| Assignee | ||
Comment 5•3 months ago
|
||
https://hg.mozilla.org/mozilla-central/rev/fa41b29265c4
https://hg.mozilla.org/mozilla-central/rev/39886ca6f78a
https://hg.mozilla.org/mozilla-central/rev/b8e959d3f3c8
Updated•3 months ago
|
Comment 9•3 months ago
|
||
[Why is this notable]: Part of CSS Anchor Positioning
[Affects Firefox for Android]: yes
[Suggested wording]: Introduced the position-try-order property, which is part of CSS Anchor Positioning and allows to change the order the position fallback options are tried.
[Links (documentation, blog post, etc)]:
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/position-try-order
https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Anchor_positioning
https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Anchor_positioning/Using
Comment 10•3 months ago
|
||
Thanks, added to the Fx148 nightly release notes, please allow 30 minutes for the site to update.
Keeping the relnote-firefox flag as ? to keep it on the radar for inclusion in the final Fx148 release notes.
Updated•2 months ago
|
Comment 12•2 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D277556
Updated•2 months ago
|
Comment 13•2 months ago
|
||
This test seems questionable as written, because the anchored box fits at its "base" position
without overflowing the IMCB, and therefore there doesn't seem to be any justification for
applying fallbacks at all (see also https://github.com/w3c/csswg-drafts/issues/13268).
This patch forces fallbacks to be considered in all cases, by ensuring the base position always
overflows and then providing a fallback that matches the "original" (non-overflowing) base position;
then the browser will choose between this and the flipped fallback according to the specified
position-try-order and writing modes involved.
Original Revision: https://phabricator.services.mozilla.com/D277557
Updated•2 months ago
|
Comment 14•2 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D277558
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Comment 15•2 months ago
|
||
| uplift | ||
Description
•