Skip to content

[scroll-animations] Possible infinite loop with element-offset #5609

@noamr

Description

@noamr

In https://drafts.csswg.org/scroll-animations-1/#element-based-offset-section
The timeline of the animation is decided by (roughly) the distance between the viewport edge and an element's edge.
However, the animation itself can affect that edge - e.g. if it's animating the height property.

So, if I'm not missing something, there could be a situation where the progress of the animation flickers endlessly.
This is already the case with hover pseudo elements (hovering on an element might cause a repositioning that would change the hover state).
Is this a problem? Maybe somehow the algorithm already deals with it?

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