Skip to content

[css-anchor-position] When to invalidate "last remembered position-try option"? #10099

@tabatkins

Description

@tabatkins

Currently, we're just using essentially the same conditions for forgetting "last remembered position-try option" as we do with "last remembered size".

But the chosen position-try option depends on more stuff than the size. Notably, what happens if you change the 'position-try-options' list? And what happens if the @position-try rules are changed? (mutated, or deleted, or we add a new one that was already referred to while not previously existing)

And theoretically, other things can change the styles, like, what if the element with a referenced anchor-name changes?

Weighing both usability with difficulty, I propose:

  • We forget the remembered option if the computed value of 'position-try-options' changes
  • We forget the remembered option if any of the referenced @position-try rules are added/removed/mutated.
  • That's it. (If other things that affect the style change, but they still don't result in having a non-overflowing position, oh well.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions