Re: [csswg-drafts] [scroll-animations-1] Allow `<length-percentage>` in `<keyframe-selector>` when combined with `<timeline-range-name>` (#10000)

Really sensible idea. Here's a supporting example that led me here:

![image](https://github.com/w3c/csswg-drafts/assets/9583103/751ab6c4-fc61-4914-92df-737e51b4dbc0)

https://codepen.io/nathanbabcock/pen/zYXmNwX

The goal is to add a gradient fade effect to the top/bottom of scrolling content as a subtle indication that there's more content in that direction. It should smoothly fade out when reaching the top or bottom of the scroll container (at an absolute pixel offset proportional to the length of the fade effect). Even with `animation-range`, there's no way to accomplish this effect without double-nesting the content in two separate divs: one to track offset from the top, and one to track offset from the bottom.

Bramus' proposal above would make it possible to express all the logic underneath a single `@keyframes` block.

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


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

Received on Thursday, 18 April 2024 02:00:41 UTC