Re: [csswg-drafts] [scroll-animations-1] Should range of ViewTimeline be clamped to scrollable range? (#7432)

I intentionally had the header not quite at the top of the page in my example, as I think in that case the author would want the parallax effect to start immediately, but cover the entire range of motion. I.e. you could imagine a common bit of CSS (not yet accelerated but could be in the future) which would apply parallax to oversized background images:

```css
@keyframes parallax-keyframes {
  from { background-position: bottom; }
  to {background-position: top; }
}
.parallax {
  animation: parallax-keyframes view-timeline()
}
```

Where view-timeline is a hypothetical syntax for an anonymous view-timeline similar to [scroll()](https://drafts.csswg.org/scroll-animations-1/rewrite#scroll-notation). This class could then be applied to any element having an oversized background image resulting in a parallax which (with clamped range) would cover the entire visible range of the image regardless of where on the page the element was.

Anyways, I agree that unclamped should be the default behavior, and I'm not sure this particular case is even important enough to solve now. I was mostly just pointing out that we can easily add a phase to support this use case in the future if it seems important.

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


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

Received on Tuesday, 26 July 2022 16:06:54 UTC