Open Bug 1917125 Opened 2 months ago Updated 2 months ago

[css-easing-2] Linear easing function should no longer require at least two points

Categories

(Core :: CSS Transitions and Animations, defect)

defect

Tracking

()

People

(Reporter: mozilla-apprentice, Assigned: dshin, NeedInfo)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-needed)

Attachments

(1 file)

A resolution was made for csswg-drafts/#10580.

[css-easing-2] Linear easing function requires at least two points?

  • RESOLVED: Allow linear() to have a single stop

Discussion.

dshin, maybe you'd like to take this linear() followup item for a recent csswg resolution?

I think the intent is that we should now accept values like

animation-timing-function: linear(0.5 50%)

...which should be equivalent to what we get from:

animation-timing-function: linear(0.5 50%, 0.5 50%)
Flags: needinfo?(dshin)
Blocks: css-easing-2
Summary: [css-easing-2] Linear easing function requires at least two points? → [css-easing-2] Linear easing function should no longer require at least two points

This change, even when it's pretty small, should probably be mentioned at https://developer.mozilla.org/en-US/docs/Web/CSS/easing-function#linear_easing_function and a new entry be added to the compat data for easing functions.

Sebastian

Keywords: dev-doc-needed
Assignee: nobody → dshin
Flags: needinfo?(dshin)

(In reply to Daniel Holbert [:dholbert] from comment #1)

I think the intent is that we should now accept values like

animation-timing-function: linear(0.5 50%)

...which should be equivalent to what we get from:

animation-timing-function: linear(0.5 50%, 0.5 50%)

For clarity: It'd be instead identical to linear(0.5 0%, 0.5 100%) i.e. A flat 0.5 output from 0% to 100% input range.
In fact, in case of a single stop, specifying any percentage/input progress value redundant - linear(0.5 <P>%) for all valid <P> values are equivalent to linear(0.5 0%, 0.5 100%).

... Though, linear(0.5) (And, presumably, linear(0.5 <P>%)) would serialize to linear(0.5) and not linear(0.5 0%, 0.5 100%), which linear(0.5 0% 100%) serializes to, as per this comment. Made a comment in spec change for clarification.

Flags: needinfo?(dshin)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: