You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css-easing-1/Overview.bs
+26-11Lines changed: 26 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -127,12 +127,18 @@ The syntax for specifying an [=easing function=] is as follows:
127
127
128
128
<h3 id=the-linear-easing-function oldids=linear-timing-function-section>The linear easing function: ''linear()''</h3>
129
129
130
-
A <dfn export lt="linear easing function|linear timing function">linear easing
131
-
function</dfn> is an easing function that interpolates linearly between its [=linear easing function/points=].
130
+
A <dfn export lt="linear easing function|linear timing function">linear easing function</dfn>
131
+
is an easing function
132
+
that interpolates linearly
133
+
between its [=linear easing function/points=].
132
134
133
-
A [=linear easing function=] has <dfn for="linear easing function">points</dfn>, a [=/list=] of [=linear easing points=]. Initially a new empty [=/list=].
135
+
A [=linear easing function=] has <dfn for="linear easing function">points</dfn>,
136
+
a [=/list=] of [=linear easing points=].
137
+
Initially a new empty [=/list=].
134
138
135
-
A <dfn>linear easing point</dfn> is a [=/struct=] that has:
139
+
A <dfn>linear easing point</dfn>
140
+
is a [=/struct=]
141
+
that has:
136
142
137
143
<dl dfn-for="linear easing point">
138
144
@@ -145,17 +151,26 @@ A <dfn>linear easing point</dfn> is a [=/struct=] that has:
145
151
146
152
<section algorithm="to calculate linear output progress">
147
153
148
-
To <dfn export>calculate linear output progress</dfn> for a given [=linear easing function=] |linearEasingFunction|, and an [=input progress value=] |inputProgress|, perform the following. It returns an [=output progress value=].
154
+
To <dfn export>calculate linear output progress</dfn>
155
+
for a given [=linear easing function=] |linearEasingFunction|,
156
+
and an [=input progress value=] |inputProgress|,
157
+
perform the following.
158
+
It returns an [=output progress value=].
149
159
150
-
1. If |linearEasingFunction|'s [=linear easing function/points=][=list/is empty=], then return |inputProgress|.
160
+
1. If |linearEasingFunction|'s [=linear easing function/points=][=list/is empty=],
161
+
then return |inputProgress|.
151
162
152
-
1. If |linearEasingFunction|'s [=linear easing function/points=] [=list/size=] is 1, then return |linearEasingFunction|'s [=linear easing function/points=][0]'s [=linear easing point/output=].
163
+
1. If |linearEasingFunction|'s [=linear easing function/points=][=list/size=] is 1,
164
+
then return |linearEasingFunction|'s [=linear easing function/points=][0]'s [=linear easing point/output=].
153
165
154
-
1. Plot |linearEasingFunction|'s [=linear easing function/points=] points on a graph using [=linear easing point/input=] as the x-axis and [=linear easing point/output=] as the y-axis.
166
+
1. Plot |linearEasingFunction|'s [=linear easing function/points=] points on a graph
167
+
using [=linear easing point/input=] as the x-axis
168
+
and [=linear easing point/output=] as the y-axis.
155
169
156
170
1. Interpolate the points linearly.
157
171
158
-
1. Extend the ends of the graph to infinity using the final angle of the line at either end. If the line starts/ends with two points of the same position, the line should extend along the x-axis.
172
+
1. Extend the ends of the graph to infinity using the final angle of the line at either end.
173
+
If the line starts/ends with two points of the same position, the line should extend along the x-axis.
159
174
160
175
1. Return the y-axis value corresponding to the x-axis value of |inputProgress|.
161
176
@@ -166,8 +181,8 @@ To <dfn export>calculate linear output progress</dfn> for a given [=linear easin
TODO: I want to support syntax like <code>linear(0 0% 0%, 1 100% 100%)</code>, but I can't figure out how it's done. <code>linear-gradient</code> seems to support that syntax but <a href="https://drafts.csswg.org/css-images-3/#typedef-color-stop-list">I can't see it in the grammar</a>.
0 commit comments