@@ -100,6 +100,8 @@ spec:css-color-3;
100100 text:blue
101101 text:transparent
102102spec:css-values-3; type:type; text:<time>
103+ spec:css-timing-1; type:type; for:step-timing-function; text:<single-timing-function>
104+ spec:css-timing-1; type:type; for:<step-timing-function> ; text:<single-timing-function>
103105</pre>
104106<!-- FIXME: These overrides aren't great for dev/TR switching -->
105107<pre class="anchors">
@@ -121,7 +123,31 @@ urlPrefix: https://html.spec.whatwg.org/multipage/infrastructure.html; type: dfn
121123 text: dispatch; url: concept-event-dispatch
122124url: https://html.spec.whatwg.org/#document; type: interface; text: Document; spec: html
123125</pre>
124- </dl>
126+
127+ <!-- FIXME: This is only here until css-timing gets added to the biblio data -->
128+ <pre class=biblio>
129+ {
130+ "CSS-TIMING": {
131+ "title": "CSS Timing Functions Level 1",
132+ "authors": [
133+ "Brian Birtles",
134+ "Dean Jackson",
135+ "Matt Rakow",
136+ "Shane Stephens"
137+ ],
138+ "date": "2017",
139+ "publisher": "W3C",
140+ "status": "ED",
141+ "href": "https://drafts.csswg.org/css-timing/",
142+ "deliveredBy": [
143+ {
144+ "shortname": "csswg",
145+ "url": "https://www.w3.org/Style/CSS/"
146+ }
147+ ]
148+ }
149+ }
150+ </pre>
125151
126152Introduction {#introduction}
127153============================
@@ -336,73 +362,18 @@ Introduction {#introduction}
336362 describes how the intermediate values used during a transition will be
337363 calculated. It allows for a transition to change speed over its
338364 duration. These effects are commonly called <em> easing</em> functions.
339- In either case, a mathematical function that provides a smooth curve is
340- used.
341- </p>
342- <p>
343- Timing functions are either defined as a stepping function or
344- a <a
345- href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve#Cubic_B.C3.A9zier_curves"> cubic
346- Bézier curve</a> .
347- The timing function takes as its input
348- the current elapsed percentage of the transition duration
349- and outputs the percentage of the way the transition is
350- from its start value to its end value.
351- How this output is used is defined by
352- the <a href="#animatable-types">interpolation rules</a>
353- for the value type.
354365 </p>
355366 <p>
356- A <a href="http://en.wikipedia.org/wiki/Step_function">stepping</a>
357- function is defined by a number that divides the domain of operation
358- into equally sized intervals. Each subsequent interval is a equal step
359- closer to the goal state. The function also specifies whether the
360- change in output percentage happens at the start or end of the
361- interval (in other words, if 0% on the input percentage is the point
362- of initial change).
363- </p>
364- <div class="figure">
365- <img src="step.png" alt="The step timing function splits
366- the function domain into a number of disjoint straight line
367- segments. steps(1, start) is a function whose
368- output value is 1 for all input values. steps(1, end) is a function whose
369- output value is 0 for all input values less than 1, and output
370- is 1 for the input value of 1. steps(3, start) is a function that
371- divides the input domain into three segments, each 1/3 in length,
372- and 1/3 above the previous segment, with the first segment starting
373- at 1/3. steps(3, end) is a function that
374- divides the input domain into three segments, each 1/3 in length,
375- and 1/3 above the previous segment, with the first segment starting
376- at 0.">
377- </div>
378- <p class="caption">
379- Step timing functions
380- </p>
381- <p>
382- A <a
383- href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve#Cubic_B.C3.A9zier_curves"> cubic
384- Bézier curve</a> is defined by four control points, P<sub> 0</sub>
385- through P<sub> 3</sub> (see Figure 1). P<sub> 0</sub> and P<sub> 3</sub>
386- are always set to (0,0) and (1,1). The 'transition-timing-function' property is used
387- to specify the values for points P<sub> 1</sub> and P<sub> 2</sub> . These
388- can be set to preset values using the keywords listed below, or can be
389- set to specific values using the ''cubic-bezier()'' function.
390- In the ''cubic-bezier()'' function, P<sub> 1</sub> and
391- P<sub> 2</sub> are each specified by both an X and Y value.
392- </p>
393- <div class="figure">
394- <img src="TimingFunction.png" alt="The Bézier timing function is a
395- smooth curve from point P0 = (0,0) to point P3 = (1,1). The
396- length and orientation of the line segment P0-P1 determines
397- the tangent and the curvature of the curve at P0 and the
398- line segment P2-P3 does the same at P3.">
399- </div>
400- <p class="caption">
401- Bézier Timing Function Control Points
367+ Timing functions are defined in the separate CSS Timing Functions module
368+ [[!css-timing]] .
369+ The <a spec=css-timing>input progress value</a> used is the percentage
370+ of the transition duration, and the <a spec=css-timing>output progress
371+ value</a> is used as the <var> p</var> value when applying the <a
372+ href="#animatable-types"> interpolation rules</a> for the value type.
402373 </p>
403374 <pre class="propdef">
404375 Name : transition-timing-function
405- Value : <<single-transition- timing-function>> #
376+ Value : <<single-timing-function>> #
406377 Initial : ''transition-timing-function/ease''
407378 Applies to : all elements, ::before and ::after pseudo elements
408379 Inherited : no
@@ -412,81 +383,7 @@ Introduction {#introduction}
412383 Computed value : Same as specified value.
413384 Canonical order : <abbr title="follows order of property value definition">per grammar</abbr>
414385 </pre>
415- <div class="prod">
416- <dfn type id="single-transition-timing-function"><single-transition-timing-function></dfn> = ''ease'' | ''linear'' | ''ease-in'' | ''ease-out'' | ''ease-in-out'' | ''step-start'' | ''step-end'' | <a lt="steps()" function>steps</a> (<<integer>> [, [ ''start'' | ''end'' ] ]?) | <a lt="cubic-bezier()" function>cubic-bezier</a> (<<number>> , <<number>> , <<number>> , <<number>> )
417- </div>
418- <p>
419- The timing functions have the following definitions.
420- </p>
421- <dl dfn-type="value" dfn-for="transition-timing-function, <single-transition-timing-function> ">
422- <dt> <dfn>ease</dfn> </dt>
423- <dd>
424- The ease function is equivalent to <a lt="cubic-bezier()" function>cubic-bezier(0.25, 0.1, 0.25, 1)</a> .
425- </dd>
426- <dt> <dfn>linear</dfn> </dt>
427- <dd>
428- The linear function is equivalent to <a lt="cubic-bezier()" function>cubic-bezier(0, 0, 1, 1)</a> .
429- </dd>
430- <dt> <dfn>ease-in</dfn> </dt>
431- <dd>
432- The ease-in function is equivalent to <a lt="cubic-bezier()" function>cubic-bezier(0.42, 0, 1, 1)</a> .
433- </dd>
434- <dt> <dfn>ease-out</dfn> </dt>
435- <dd>
436- The ease-out function is equivalent to <a lt="cubic-bezier()" function>cubic-bezier(0, 0, 0.58, 1)</a> .
437- </dd>
438- <dt> <dfn>ease-in-out</dfn> </dt>
439- <dd>
440- The ease-in-out function is equivalent to <a lt="cubic-bezier()" function>cubic-bezier(0.42, 0, 0.58, 1)</a> .
441- </dd>
442- <dt> <dfn>step-start</dfn> </dt>
443- <dd>
444- The step-start function is equivalent to <a lt="steps()" function>steps(1, start)</a> .
445- </dd>
446- <dt> <dfn>step-end</dfn> </dt>
447- <dd>
448- The step-end function is equivalent to <a lt="steps()" function>steps(1, end)</a> .
449- </dd>
450- <dt> <dfn function lt="steps()">steps(<<integer>>[, [ start | end ] ]?)</dfn> </dt>
451- <dd>
452- Specifies a stepping function, described above, taking two
453- parameters. The first parameter specifies the number of intervals
454- in the function. It must be a positive integer (greater than 0).
455- The second parameter, which is optional, is
456- either the value <dfn value for="steps()">start</dfn> or <dfn value for="steps()">end</dfn> , and specifies the point
457- at which the change of values occur within the interval.
458- If the second parameter is omitted, it is given the value ''end'' .
459- </dd>
460- <dt> <dfn function lt="cubic-bezier()">cubic-bezier(<<number>>, <<number>>, <<number>>, <<number>>)</dfn> </dt>
461- <dd>
462- Specifies a <a
463- href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve"> cubic-bezier
464- curve</a> . The four values specify points P<sub> 1</sub> and
465- P<sub> 2</sub> of the curve as (<var> x1</var> , <var> y1</var> , <var> x2</var> , <var> y2</var> ). Both x values must be
466- in the range [0, 1] or the definition is invalid. The y values can
467- exceed this range.
468- </dd>
469- </dl>
470-
471- ### Serializing a timing function ### {#serializing-a-timing-function}
472-
473- Timing functions are serialized using the common serialization patterns
474- defined in [[CSSOM]] with the following additional requirements:
475-
476- * The keyword values ''ease'' , ''linear'' , ''ease-in'' , ''ease-out'' ,
477- and ''ease-in-out'' are serialized as-is, that is, they are
478- <em> not</em> converted to the equivalent ''cubic-bezier()''
479- function before serializing.
480-
481- * Step timing functions, whether they are specified using the
482- ''steps()'' function or either of the ''step-start'' or ''step-end''
483- keywords, are serialized as follows:
484-
485- 1. If the point at which the value changes is ''end'' , serialize
486- as <a lt="steps()" function>steps(<integer>)</a> .
487-
488- 2. Otherwise, serialize as <a lt="steps()"
489- function>steps(<integer>, start)</a> .
386+
490387
491388<span id="the-transition-delay-property-"> The 'transition-delay' Property</span> {#transition-delay-property}
492389-------------------------------------------------------------------------------------------------------------
@@ -530,7 +427,7 @@ Introduction {#introduction}
530427 </pre>
531428
532429 <div class="prod">
533- <dfn type id="single-transition"><single-transition></dfn> = [ ''transition-property/none'' | <<single-transition-property>> ] || <<time>> || <<single-transition- timing-function>> || <<time>>
430+ <dfn type id="single-transition"><single-transition></dfn> = [ ''transition-property/none'' | <<single-transition-property>> ] || <<time>> || <<single-timing-function>> || <<time>>
534431 </div>
535432
536433 <p>
0 commit comments