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
Fixes following review
  • Loading branch information
jakearchibald committed Jul 12, 2022
commit a50902947a1a4012a25d1b697d84bf5a0453c08a
16 changes: 9 additions & 7 deletions css-easing-2/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Editor: Dean Jackson, Apple Inc https://www.apple.com/, dino@apple.com, w3cid 42
Editor: Matt Rakow, Microsoft, w3cid 62267
Former Editor: Shane Stephens, Google, shans@google.com, w3cid 47691
Markup Shorthands: markdown yes
Indent: 2

Abstract: This CSS module describes a way for authors to define a transformation
that controls the rate of change of some value.
Expand Down Expand Up @@ -137,7 +138,7 @@ The syntax for specifying an [=easing function=] is as follows:
<div class=example>
''linear()'' allows the definition of easing functions that interpolate linearly between a set of points.

For example, `linear(0, 0.25, 1)` produces an easing function
For example, ''linear(0, 0.25, 1)'' produces an easing function
that moves linearly from 0, to 0.25, then to 1:

<figure>
Expand All @@ -151,7 +152,7 @@ The syntax for specifying an [=easing function=] is as follows:

For example, ''linear(0, 0.25 75%, 1)'' produces the following easing function,
which spends 75% of the time transitioning from ''0'' to ''.25'',
then the last 25% transitiong from ''.25'' to ''1'':
then the last 25% transitioning from ''.25'' to ''1'':

<figure>
<img class="easing-graph" src="linear-with-input-example.svg" width="400"
Expand All @@ -166,7 +167,8 @@ The syntax for specifying an [=easing function=] is as follows:
If two input values are provided for a single output,
it results in two points with the same output.

For example, `linear(0, 0.25 25% 75%, 1)` is equivalent to `linear(0, 0.25 25%, 0.25 75%, 1)`,
For example, ''linear(0, 0.25 25% 75%, 1)''
is equivalent to ''linear(0, 0.25 25%, 0.25 75%, 1)'',
producing the following easing function:

<figure>
Expand Down Expand Up @@ -342,9 +344,9 @@ It returns a [=linear easing function=] or <i>failure</i>.

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%)`
- ''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%)''
</div>

<section algorithm="linear easing function">
Expand Down Expand Up @@ -439,7 +441,7 @@ 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`,
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
Expand Down