Re: [csswg-drafts] [scroll-animations-1] Phases for taller than scrollport subjects (#7973)

The enter/exit phases are defined not based on "am I crossing a threshold", but rather "am I in the process of entering the viewport" where the state of _having entered_ is the "contain" phase.

And the "contain" phase is not defined as "fully contained by the viewport" for large items because this would mean such items would never reach the contain phase. We could rename it, but basically the "contain" phase as it's defined now is the "I'm fully in the viewport (inasmuch as I can be)" phase.

Are there use cases for other phase interpretations? Yes. Should we find ways to enable them? Probably. But what we need to make really easy is the basic case: an animation where a semi-transparent element fades to opaque as it's brought in view and fades out as it leaves, or anything else on an equivalent timeline. And that needs to work reliably without the author knowing its size relative to the viewport or needing to think too hard about it.

If the animation code depends on knowing those relative sizes, or that's easy to screw up when they invert on someone's computer, we've designed a system that _will fail_ depending on the environment a page is loaded in, and that's bad CSS language design.

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


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

Received on Wednesday, 7 December 2022 07:02:33 UTC