Yeah - this ticket is backwards for us. We _always_ use the scrollable containing block for all anchor resolution and overflow evaluation. As in comment 0, we should do it only for `position-area`. The difference is demonstrated in the attached test case. There are two anchors: `--top` and `--bottom`. The former is visible without scrolling, the latter is not. The purple positioned element, which uses `position-area`, uses the scrollable containing block, so it is able to anchor to the `--bottom` anchor without overflow. On the other hand the violet positioned element, which uses `anchor()` functions, uses the local containing block, and the attempt to anchor to the `--bottom` anchor results in an overflow. So it triggers the use of `position-try-fallbacks`, anchoring to the `--top` anchor instead. A similar effect should apply to `position-visibility: no-overflow`.
Bug 1989292 Comment 3 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Yeah - we have a backwards problem. We _always_ use the scrollable containing block for all anchor resolution and overflow evaluation. As in comment 0, we should do it only for `position-area`. The difference is demonstrated in the attached test case. There are two anchors: `--top` and `--bottom`. The former is visible without scrolling, the latter is not. The purple positioned element, which uses `position-area`, uses the scrollable containing block, so it is able to anchor to the `--bottom` anchor without overflow. On the other hand the violet positioned element, which uses `anchor()` functions, uses the local containing block, and the attempt to anchor to the `--bottom` anchor results in an overflow. So it triggers the use of `position-try-fallbacks`, anchoring to the `--top` anchor instead. A similar effect should apply to `position-visibility: no-overflow`.
Yeah - we have a backwards problem. We _always_ use the scrollable containing block for all anchor resolution and overflow evaluation. As in comment 0, we should do it only for `position-area`. The difference is demonstrated in the attached test case. There are two anchors: `--top` and `--bottom`. The former is visible without scrolling, the latter is not. The purple positioned element, which uses `position-area`, uses the scrollable containing block, so it is able to anchor to the `--bottom` anchor without overflow. On the other hand, the violet positioned element, which uses `anchor()` functions, uses the local containing block, and attempting to anchor to the `--bottom` anchor results in an overflow. So it triggers the use of `position-try-fallbacks`, anchoring to the `--top` anchor instead. A similar effect should apply to `position-visibility: no-overflow`.