w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.52k stars 672 forks source link

[css-easing] Resolving curves not available at parse time #11211

Open sesse opened 1 week ago

sesse commented 1 week ago

https://drafts.csswg.org/css-easing/#funcdef-linear specifies:

“If an argument lacks a , its input progress value is initially empty, but that is immediately corrected by linear() canonicalization after parsing.”

However, it is not always possible to canonicalize at parse time. For instance, if any of the stops' x values is calc(0.5 + 0.2 * sign(1em - 1px)), we may need to wait until the style is computed before we know if it needs to be clamped to the previous point or not. How do we handle this? What if some of the stops may be resolvable but not all of them?