Re: [csswg-drafts] [css-anchor-position] fallback-position behavior: spec vs. expectation (#12682)

> If we do not provide a switch, is there a hacky (or non-hacky) way for authors to opt themselves in by forcing layout in the cases where they want fallback positions re-evaluated?

If you do any of the following, it'll forget the last-remembered position option and run position option trying again (taken from the [spec](https://drafts.csswg.org/css-anchor-position-1/#:~:text=If%20el%20has%20a%20last%20successful%20position%20option%20remove))

> If el has a [last successful position option](https://drafts.csswg.org/css-anchor-position-1/#last-successful-position-option) remove its last successful position option if any of the following are true:
> * Its computed [position](https://drafts.csswg.org/css-position-3/#propdef-position) value has changed, its [containing block](https://drafts.csswg.org/css-display-4/#containing-block) association has changed, or it no longer generates a box.
> * Its computed value for any [longhand](https://drafts.csswg.org/css-cascade-5/#longhand) of [position-try](https://drafts.csswg.org/css-anchor-position-1/#propdef-position-try) has changed.
> * Its computed value for any [accepted @position-try property](https://drafts.csswg.org/css-anchor-position-1/#accepted-position-try-properties) has changed.
> * Any of the [@position-try](https://drafts.csswg.org/css-anchor-position-1/#at-ruledef-position-try) rules referenced by it have been added, removed, or mutated.

-- 
GitHub Notification of comment by tuankiet65
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12682#issuecomment-3524643357 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 13 November 2025 01:11:14 UTC