Skip to content

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

Closed

Description

@fantasai

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)?

Activity

  1. tabatkins commented on Sep 30, 2021

    @tabatkins
    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.

  2. Loirooriol commented on Oct 1, 2021

    @Loirooriol
    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions