Skip to content

[css-easing-2] Intended possibility of discontinuity of linear()? #8933

@yarusome

Description

@yarusome

2.1.2 Parsing ensures that points in <linear-stop-list> have (not necessarily strictly) increasing inputs. And in 2.1.4 Output of a linear easing function (irrelevant steps omitted):

  1. Let pointAIndex be index of the last item in points with an input less than or equal to inputProgress, or 0 if there is no match.

[…]

  1. Let pointA be points[pointAIndex].

  2. Let pointB be points[pointAIndex + 1].

[…]

Following these steps, linear(0, 0.6 50%, 0.4 50%, 1) produces a discontinuous piecewise linear function:

example

Is this really intended by the spec? If so, I'll add an example in mdn/content#27167.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Closed as Question AnsweredUsed when the issue is more of a question than a problem, and it's been answered.css-easing-2Current Work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions