Re: [csswg-drafts] [scroll-animations-1] Allow named ranges to be used with math functions (#8852)

Another use-case would be this one right here:

<img width="785" alt="image" src="https://github.com/w3c/csswg-drafts/assets/213073/3d922e93-4507-4573-9813-ae9fb4e591ba">

The bottom right image reveals itself from `cover 25%` to `cover 50%` but is never fully revealed as we’re at the bottom of the page.

Setting the `animation-range-end` to the fictitious `min(100%, cover 50%)` would fix that, by shortening the animation scroll distance. Side-effect is that it runs “faster”.

> The best way to hack this in would be via a special function, valid in animation-range, that took a keyword+percentage pair and resolved it to a %.

Would that be something like `min(resolve(100%), resolve(cover 50%))`, or more like `min-range(100%, cover 50%)`?

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


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

Received on Tuesday, 13 June 2023 08:23:18 UTC