NEW317916
position-try-order most-block-size doesn't work as expected
https://bugs.webkit.org/show_bug.cgi?id=317916
Summary position-try-order most-block-size doesn't work as expected
Jake Archibald
Reported 2026-06-26 02:43:41 PDT
https://random-stuff.jakearchibald.com/bug-repros/position-try-order/ - the popover should appear above the button. Although the spec isn't 100% clear, the popover appearing should trigger https://drafts.csswg.org/css-anchor-position-1/#fallback-sensitive-changes, so the popover should flip-block to the top, as that area has most-block-size. This is important for the default styles of custom select.
Attachments
Kiet Ho
Comment 1 2026-06-28 01:30:54 PDT
Hi, thanks for filing this bug report. From a quick look, I think what's happening is that when trying position options, WebKit always tries the original, non-fallback position first. If that position overflows, then it tries the position options in the order sorted by position-try-order. In your repro, it'll try "position-try: bottom" first before trying "position-try-fallback: flip-block". I remember there's a recent CSSWG resolution somewhere that says: position-try-order should affect the base style too, so when trying position options, it sorts the options + base style using position-try-order, then tries in the sorted order. WebKit hasn't implemented this yet.
Kiet Ho
Comment 2 2026-06-28 01:37:40 PDT
I found the resolution [1] > RESOLVED: Use all positions for position-try-order, including base styles [1]: https://github.com/w3c/csswg-drafts/issues/13268#issuecomment-4180719910
Note You need to log in before you can comment on or make changes to this bug.