Skip to content

Commit 0bde5c9

Browse files
committed
Attempting semantic line breaks
1 parent 654008f commit 0bde5c9

File tree

1 file changed

+26
-11
lines changed

1 file changed

+26
-11
lines changed

css-easing-1/Overview.bs

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,18 @@ The syntax for specifying an [=easing function=] is as follows:
127127

128128
<h3 id=the-linear-easing-function oldids=linear-timing-function-section>The linear easing function: ''linear()''</h3>
129129

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=].
132134

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=].
134138

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:
136142

137143
<dl dfn-for="linear easing point">
138144

@@ -145,17 +151,26 @@ A <dfn>linear easing point</dfn> is a [=/struct=] that has:
145151

146152
<section algorithm="to calculate linear output progress">
147153

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=].
149159

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|.
151162

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=].
153165

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.
155169

156170
1. Interpolate the points linearly.
157171

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.
159174

160175
1. Return the y-axis value corresponding to the x-axis value of |inputProgress|.
161176

@@ -166,8 +181,8 @@ To <dfn export>calculate linear output progress</dfn> for a given [=linear easin
166181
<pre class="prod">
167182
<dfn>&lt;linear-stop-list></dfn> =
168183
[ <<linear-hint>>? , <<linear-stop>> ]#
169-
<dfn>&lt;linear-stop></dfn> = <<number>> && <<length-percentage>>?
170-
<dfn>&lt;linear-hint></dfn> = <<length-percentage>>
184+
<dfn>&lt;linear-stop></dfn> = <<number>> && <<percentage>>?
185+
<dfn>&lt;linear-hint></dfn> = <<percentage>>
171186
</pre>
172187

173188
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

Comments
 (0)