Skip to content

[css-easings-2] linear() serialization does not conform to shortest principle #9288

Open
@cdoublev

Description

@cdoublev

https://drafts.csswg.org/css-easing-2/#linear-easing-function-serializing

The serialization of linear() includes input values for each point, and input values are never less than the input of the previous point.

For example:

  • linear(0, 0.25, 1) serializes as linear(0 0%, 0.25 50%, 1 100%)
  • linear(0 20%, 0.5 10%, 1) serializes as linear(0 20%, 0.5 20%, 1 100%)
  • linear(0, 0.25 25% 75%, 1) serializes as linear(0 0%, 0.25 25%, 0.25 75%, 1 100%)

https://drafts.csswg.org/cssom-1/#serialize-a-css-value

If component values can be omitted or replaced with a shorter representation without changing the meaning of the value, omit/replace them.

It should probably be consistent with the serialization of a gradient color stop list (related).

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