Re: [csswg-drafts] [scroll-animations-1] Percentages vs Pixels for Scroll Timeline Values (#7045)

A further argument in support of percentages is that I struggle with calling a length based unit a valid time value.  Perhaps if we had used a more generic term within the web-animations-1 API we could more easily accommodate different units, but we are locked into using currentTime etc.  Percentages can be thought of as a normalized dimensionless time, so this doesn't seem like much of a stretch, but a <length> as a <time> strikes me as odd.  Perhaps I'm just being pedantic, but think we should try to avoid a potential obstacle that makes the animation API less intuitive.

I should add that this does not necessarily need to be an either or situation for setters in the API.  If using CSSNumberish with setters we could decide to allow for different units, provided there is a simple conversion process and consensus on the units for the getters and calculated timing call.  The web-animation-2 spec contains rules for how to convert times to percentages when setting a scroll-timeline to an animation.



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


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

Received on Friday, 4 March 2022 19:58:22 UTC