Implement custom `@position-try` fallback support for position-try-fallbacks
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox145 | --- | fixed |
People
(Reporter: jari, Assigned: emilio)
References
(Blocks 2 open bugs)
Details
(Keywords: dev-doc-complete, Whiteboard: [anchorpositioning:m2], [wptsync upstream])
Attachments
(1 file)
Position-try fallbacks accept a dashed identifier referring to a position-try option containing position property alternatives. https://drafts.csswg.org/css-anchor-position-1/#position-try-fallbacks The feature is not exclusive to anchor positioned elements.
For a basic implementation, the supported position-try properties may include inset properties, margin properties, sizing properties and self-alignment properties, and not include position-anchor and position-area properties, which require anchor positioning.
Position-try order and try-tactics features are excluded from the scope of this bug. Invalidation (e.g. when fallbacks get scrolled out of view) is also out of scope.
After this bug is complete, the test position-try-fallbacks-limit.html
should pass.
Updated•8 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
| Reporter | ||
Updated•4 months ago
|
Comment 1•4 months ago
|
||
Jari is going to be working on bug 1924210 / bug 1928128.
Updated•4 months ago
|
Comment 2•4 months ago
•
|
||
Breakdown, drawing a parallel with @keyframe:
- Save
@position-trydata inCacadeData: 1, 2 - Implement lookup for
@position-trydeclarations by name inStylist: 1 - Implement declaration -> computed value conversion 1
- Expose to layout: 1
- Trigger reflow using overridden values (Something smiliar to this)
- Ensure that
getComptuedStylereflects the used value based on the selected fallback.
| Assignee | ||
Updated•4 months ago
|
Updated•3 months ago
|
| Assignee | ||
Comment 3•3 months ago
|
||
Remaining failures are due to position-try-order, afaict.
Updated•3 months ago
|
| Assignee | ||
Updated•3 months ago
|
Backed out for causing wpt failures.
Updated•3 months ago
|
Comment 10•3 months ago
|
||
Comment 12•3 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/f08b02209552
https://hg.mozilla.org/mozilla-central/rev/9332758579d0
https://hg.mozilla.org/mozilla-central/rev/4e5b5627e3ee
https://hg.mozilla.org/mozilla-central/rev/dad455aa07a4
Updated•3 months ago
|
Comment 14•2 months ago
|
||
Hi all. I'm currently documenting this on MDN. I'm testing it with the examples available at:
- https://developer.mozilla.org/en-US/docs/Web/CSS/@position-try
- https://developer.mozilla.org/en-US/docs/Web/CSS/position-try-fallbacks
- https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_anchor_positioning/Try_options_hiding
The fallbacks stuff seems really quite broken in Firefox (I'm using Nightly). Is there a pref I need to turn on for this?
They work better in Chrome, but the behavior is still a bit strange. I'm wondering if the behavior has changed since I first documented these? Maybe I need to rewrite the examples so that they work better in general.
Comment 15•1 month ago
|
||
See https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/145#experimental_web_features.
Description
•