- From: Robert Flack via GitHub <sysbot+gh@w3.org>
- Date: Thu, 17 Mar 2022 12:43:18 +0000
- To: public-css-archive@w3.org
Another reason to use CSSNumberish is to explain why there would be an automatic conversion if you apply a scroll-timeline to an animation that has a duration in time. If we naively mix units, you would convert milliseconds to pixels which in my opinion is unexpected. e.g. ```html <style> #target { animation: slide 2s linear; } .scroll-linked { animation-timeline: scroll(); } </style> <div id="target" class="scroll-linked"></div> ``` Naively, if we want `animation.currentTime` to be unit-less pixels, then we would be effectively treating each millisecond as one pixel. However, automatically converting the above animation to a 2000px scroll animation feels awkward. As a developer, I would greatly prefer the above animation either scale to fit the timeline or fail to animate due to an error mixing units. -- GitHub Notification of comment by flackr Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7102#issuecomment-1070881886 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 17 March 2022 12:43:19 UTC