Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-values-4] Out of range progress of generic interpolation function / mix() #6701

Closed
fantasai opened this issue Sep 29, 2021 · 2 comments
Closed
Labels
Closed Accepted by Editor Discretion Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-values-4 Current Work

Comments

@fantasai
Copy link
Collaborator

fantasai commented Sep 29, 2021

In #581 and #2854 we resolved to add a generic interpolation function, which takes a percentage, a start value, and an end value.

  mix( [ <percentage> && [ by <easing-function> ]? ] ; <start-value> ; <end-value>)

One outstanding question is, what happens if the progress percentage is outside the 0-100% range? Do we clamp the values to the range? Do we interpolate past the range? Do we need a syntactic switch between the two (e.g. a clamp keyword in the first arg)?

@tabatkins
Copy link
Member

Out-of-range interpolation is already part of how CSS's interpolation mechanics work (you need it to handle some cubic-bezier(), if nothing else); we don't need to do anything special for this.

@Loirooriol
Copy link
Contributor

The percentage represents the input progress value, right? That's in the range [-∞, ∞]. So I wouldn't clamp. If some authors want to clamp, they can use clamp(0%, var(--progress), 100%) or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted by Editor Discretion Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-values-4 Current Work
3 participants