Skip to content

[css-values-5] *-interpolate() with equal stop positions or without segments #14313

Open

Description

@cdoublev

https://drafts.csswg.org/css-values-5/#interpolation-notation

What should be the result of these functions?

  1. calc-interpolate(1, 0: 0, 1: 1, 1: 2)
  2. calc-interpolate(1px, 0px: 1)
  3. calc-interpolate(1, 0: 0)

For (1), it depends on which of { x: 1, y: 1 } or { x: 1, y: 2 } takes precedence. I would say that if any stop has an input position that is equal to one or more preceding stops, it replaces them. Thus, calc-interpolate(0.5, 0: 0px, 1: 1px, 1: 1em) would serialize with calc-interpolate(0.5, 0: 0px, 1: 1em) as a component of a declared value.

For (2), if I am not mistaken, it defines an interpolation map from and to 0px. I would say that if there is a single stop and the interpolation progress is lower or greater than its input position, the resolved value is -infinity or +infinity, respectively.

For (3), it does not appear to define any segment. I would say the same applies as for (2).

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