Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b4bad72
Calculating progress & serialising linear-spline
jakearchibald Jun 24, 2022
1c326ef
Define function creation
jakearchibald Jun 24, 2022
1e5b11d
Update largest number when inferring 0 for the first item
jakearchibald Jun 24, 2022
a4c01be
Simplify serialisation
jakearchibald Jun 27, 2022
8276f40
Spec tidy up
jakearchibald Jun 27, 2022
0e5043f
Connecting parsing and serialising
jakearchibald Jun 27, 2022
f621932
Fix indenting
jakearchibald Jun 27, 2022
ef29eae
Dark mode figures
jakearchibald Jul 6, 2022
2739467
Merge remote-tracking branch 'origin/main' into css-easing-2-linear-s…
jakearchibald Jul 6, 2022
05473a9
Markdown headings
jakearchibald Jul 6, 2022
f3c7508
Switch back to linear()
jakearchibald Jul 6, 2022
973a84a
Missed a few old spline references
jakearchibald Jul 7, 2022
c6fe005
Examples
jakearchibald Jul 8, 2022
c51794a
Existing examples are good enough IMO
jakearchibald Jul 8, 2022
8e38422
Forgot to specify 'index'
jakearchibald Jul 8, 2022
8fbc910
Missing comma
jakearchibald Jul 8, 2022
5221e11
Adding serialization examples
jakearchibald Jul 10, 2022
589a383
Be more specific about the linear keyword
jakearchibald Jul 10, 2022
ce4c5d1
A little more specific about the serialization of linear()
jakearchibald Jul 11, 2022
932ce07
Apply suggestions from code review
jakearchibald Jul 12, 2022
a509029
Fixes following review
jakearchibald Jul 12, 2022
d75bd5c
Clarify note
jakearchibald Jul 12, 2022
bdbb745
Make all graphs transparent
jakearchibald Jul 17, 2022
17e0ad3
One more
jakearchibald Jul 17, 2022
8ee8bf2
Move examples after normative text
jakearchibald Jul 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Be more specific about the linear keyword
  • Loading branch information
jakearchibald committed Jul 10, 2022
commit 589a3830ea46d3220df5c1d8256bc0887115c39e
27 changes: 23 additions & 4 deletions css-easing-2/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,27 @@ It returns an [=output progress value=].

<h3 id=the-linear-easing-keyword oldids=linear-timing-function-section>The linear easing keyword: ''linear''</h3>

The <dfn dfn-type=value for=easing-function>linear</dfn> keyword is a shorthand
for <a lt="linear()" function>linear(0, 1)</a>.
The <dfn dfn-type=value for=easing-function>linear</dfn> keyword
produces a [=linear easing function=]
with two [=linear easing function/points=]:

1. : [=linear easing point/input=]
:: 0
: [=linear easing point/output=]
:: 0

1. : [=linear easing point/input=]
:: 1
: [=linear easing point/output=]
:: 1

Note: This results in an identity function,
meaning that its [=output progress value=] is equal to the
[=input progress value=] for all inputs.

Note: Although this produces a [=linear easing function=],
it serializes as `linear`,
as per the rules in [Serialization](#serialization).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want a literal linear(0, 1) to serialize as linear? I think that would be surprising. I'd prefer to not collapse the keyword and function together; just saying that linear acts the same as linear(0, 1) should be fine imo.


<h3 id=cubic-bezier-easing-functions oldids=cubic-bezier-timing-functions>Cubic
B&eacute;zier easing functions:
Expand Down Expand Up @@ -714,8 +733,8 @@ defined in [[CSSOM]] with the following additional requirements:

* The keyword values ''ease'', ''linear'', ''ease-in'', ''ease-out'',
and ''ease-in-out'' are serialized as-is, that is, they are
<em>not</em> converted to the equivalent ''cubic-bezier()''
function before serializing.
<em>not</em> converted to the equivalent ''cubic-bezier()'' or
''linear()'' function before serializing.

* Step easing functions, whether they are specified using the
''steps()'' function or either of the ''step-start'' or ''step-end''
Expand Down