Sun, 03 Feb 2013 23:26:51 -0700
[css3-transitions] Interpolation of colors is in premultiplied space.
This is as resolved in http://lists.w3.org/Archives/Public/www-style/2012Nov/0262.html
1 <!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01//EN'
2 'http://www.w3.org/TR/html4/strict.dtd'>
4 <html lang="en">
5 <head>
6 <title>CSS Transitions</title>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
8 <link rel="stylesheet" type="text/css" href="../default.css">
9 <style type="text/css">
10 table.animatable-properties {
11 border-collapse: collapse;
12 }
13 table.animatable-properties td {
14 padding: 0.2em 1em;
15 border: 1px solid black;
16 }
17 div.prod { margin: 1em 2em; }
18 </style>
19 <link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-ED.css">
20 </head>
22 <body>
24 <div class="head">
25 <!--logo-->
27 <h1>CSS Transitions</h1>
29 <h2 class="no-num no-toc">[LONGSTATUS] [DATE]</h2>
30 <dl>
31 <dt>This version:
32 <dd>
33 <a href="[VERSION]">
34 http://dev.w3.org/csswg/css3-transitions/</a>
35 <!--http://www.w3.org/TR/[YEAR]/WD-[SHORTNAME]-[CDATE]/-->
36 <dt>Latest version:
37 <dd><a href="http://www.w3.org/TR/css3-transitions/">
38 [LATEST]</a>
39 <dt>Editor's draft:
40 <dd><a href="http://dev.w3.org/csswg/[SHORTNAME]/">http://dev.w3.org/csswg/[SHORTNAME]/</a>
41 <dt>Previous version:
42 <dd><a href="http://www.w3.org/TR/2012/WD-css3-transitions-20120403/">
43 http://www.w3.org/TR/2012/WD-css3-transitions-20120403/</a>
44 <dt id="editors-list">Editors:
45 <dd><a href="mailto:dino@apple.com">Dean Jackson</a> (<a
46 href="http://www.apple.com/">Apple Inc</a>)
47 <dd><a href="mailto:hyatt@apple.com">David Hyatt</a> (<a
48 href="http://www.apple.com/">Apple Inc</a>)
49 <dd><a href="mailto:cmarrin@apple.com">Chris Marrin</a> (<a
50 href="http://www.apple.com/">Apple Inc</a>)
51 <dd class=vcard><a class=fn href="http://dbaron.org/">L. David Baron</a> (<a
52 class=org href="http://www.mozilla.org/">Mozilla</a>)
54 <dt>Issues list:
55 <dd><a href="https://www.w3.org/Bugs/Public/buglist.cgi?query_format=advanced&product=CSS&component=Transitions&resolution=---&cmdtype=doit">in Bugzilla</a>
57 <dt>Discussion:</dt>
58 <dd><a href="http://lists.w3.org/Archives/Public/www-style/">www-style@w3.org</a> with subject line “<kbd>[[SHORTNAME]] <var>… message topic …</var></kbd>”
60 <dt>Test suite:
61 <dd>none yet
62 </dl>
64 <!--copyright-->
66 <hr title="Separator for header">
67 </div>
69 <h2 class="no-num no-toc" id="abstract">Abstract</h2>
71 <p>CSS Transitions allows property changes in CSS values to occur smoothly
72 over a specified duration.
74 <h2 class="no-num no-toc" id="status">Status of this document</h2>
75 <!--status-->
77 <p>
78 The <a href="ChangeLog">list of changes made to this specification</a> is
79 available.
80 </p>
82 <h2 class="no-num no-toc" id="contents">Table of contents</h2>
83 <!--toc-->
86 <h2 id="introduction">Introduction</h2>
88 <p><em>This section is not normative.</em>
89 <p>
90 This document introduces new CSS features to enable <em>implicit transitions</em>, which describe how CSS properties can be made to change smoothly from one value to another over a given duration.
91 </p>
93 <h2 id="transitions"><a id="transitions-">Transitions</a></h2>
94 <p>
95 Normally when the value of a CSS property changes, the rendered result is instantly updated, with the affected elements immediately changing from the old property value to the new property value. This section describes a way to specify transitions using new CSS properties. These properties are used to animate smoothly from the old state to the new state over time.
96 </p>
97 <p>
98 For example, suppose that transitions of one second have been defined on the <code class="property">'left'</code> and
99 <code class="property">'background-color'</code> properties. The following diagram illustrates the effect of updating those properties on an element, in this case moving it to the right and changing the background from red to blue. This assumes other transition parameters still have their default values.
100 </p>
101 <div class="figure">
102 <img src="transition1.png" alt="">
103 </div>
104 <p class="caption">
105 Transitions of <code class="property">'left'</code> and <code class="property">'background-color'</code>
106 </p>
107 <p>
108 Transitions are a presentational effect. The computed value of a property transitions over time from the old value to the new value. Therefore if a script queries the computed style of a property as it is transitioning, it will see an intermediate value that represents the current animated value of the property.
109 </p>
110 <p>
111 Only animatable CSS properties can be transitioned. See the table at the end of this document for a list
112 of properties that are animatable.
113 </p>
114 <p>
115 The transition for a property is defined using a number of new properties. For example:
116 </p>
117 <div class="example">
118 <p style="display:none">
119 Example(s):
120 </p>
121 <pre>
122 div {
123 transition-property: opacity;
124 transition-duration: 2s;
125 }
126 </pre>The above example defines a transition on the <code class="property">'opacity'</code> property that, when a new value is assigned to it, will cause a smooth change between the old value and the new value over a period of two seconds.
127 </div>
128 <p>
129 Each of the transition properties accepts a comma-separated list, allowing multiple transitions to be defined, each acting on a different property. In this case, the individual transitions take their parameters from the same index in all the lists. For example:
130 </p>
131 <div class="example">
132 <p style="display:none">
133 Example(s):
134 </p>
135 <pre>
136 div {
137 transition-property: opacity, left;
138 transition-duration: 2s, 4s;
139 }
141 </pre>This will cause the <code class="property">'opacity'</code> property to transition over a period of two seconds and the left property to transition over a period of four seconds.
142 </div>
144 <p id="list-matching">
145 In the case where the lists of values in transition properties
146 do not have the same length, the length of the
147 'transition-property' list determines the number of items in
148 each list examined when starting transitions. The lists are
149 matched up from the first value: excess values at the end are
150 not used. If one of the other properties doesn't have enough
151 comma-separated values to match the number of values of
152 'transition-property', the UA must calculate its used value by
153 repeating the list of values until there are enough. This
154 truncation or repetition does not affect the computed value.
155 <span class="note">
156 Note: This is analogous to the behavior of the 'background-*'
157 properties, with 'background-image' analogous to
158 'transition-property'.
159 </span>
160 </p>
162 <div class="example">
163 <p style="display:none">
164 Example(s):
165 </p>
166 <pre>
167 div {
168 transition-property: opacity, left, top, width;
169 transition-duration: 2s, 1s;
170 }
171 </pre>The above example defines a transition on the <code class="property">'opacity'</code> property of 2 seconds duration, a
172 transition on the <code class="property">'left'</code> property of 1
173 second duration, a transition on the <code class="property">'top'</code> property of 2 seconds duration and a
174 transition on the <code class="property">'width'</code> property of 1
175 second duration.
177 </div>
179 <!-- ======================================================================================================= -->
180 <h3 id="transition-property-property"><a id="the-transition-property-property-">
181 The <code class="property">'transition-property'</code> Property
182 </a></h3>
183 <p>
184 The <code class="property">'transition-property'</code> property specifies the name of the CSS property to which the transition is applied.
185 </p>
186 <div class="issue">
187 We may ultimately want to support a keypath syntax for this property. A keypath syntax would enable different transitions to be specified for components of a property. For example the blur of a shadow could have a different transition than the color of a shadow.
188 </div>
189 <table class="propdef">
190 <tbody>
191 <tr>
192 <td>
193 <em>Name:</em>
194 </td>
195 <td>
196 <dfn id="transition-property">transition-property</dfn>
197 </td>
198 </tr>
199 <tr>
200 <td>
201 <em>Value:</em>
202 </td>
203 <td>
204 none | <span><single-transition-property></span> [ ',' <span><single-transition-property></span> ]*
205 </td>
206 </tr>
207 <tr>
208 <td>
209 <em>Initial:</em>
210 </td>
211 <td>
212 all
213 </td>
214 </tr>
215 <tr>
216 <td>
217 <em>Applies to:</em>
218 </td>
219 <td>
220 all elements, :before and :after pseudo elements
221 </td>
222 </tr>
223 <tr>
224 <td>
225 <em>Inherited:</em>
226 </td>
227 <td>
228 no
229 </td>
230 </tr>
231 <tr>
232 <td>
233 <em>Animatable:</em>
234 </td>
235 <td>
236 no
237 </td>
238 </tr>
239 <tr>
240 <td>
241 <em>Percentages:</em>
242 </td>
243 <td>
244 N/A
245 </td>
246 </tr>
247 <tr>
248 <td>
249 <em>Media:</em>
250 </td>
251 <td>
252 visual
253 </td>
254 </tr>
255 <tr>
256 <td>
257 <em>Computed value:</em>
258 </td>
259 <td>
260 Same as specified value.
261 </td>
262 </tr>
263 <tr>
264 <td>
265 <em>Canonical order:</em>
266 </td>
267 <td>
268 <abbr title="follows order of property value definition">per grammar</abbr>
269 </td>
270 </tr>
271 </tbody>
272 </table>
274 <div class="prod">
275 <dfn id="single-transition-property"><single-transition-property></dfn> = all | <IDENT>
276 </div>
278 <p>
279 A value of 'none' means that no property will transition.
280 Otherwise, a list of properties to be transitioned, or the
281 keyword 'all' which indicates that all properties are to be
282 transitioned, is given.
283 </p>
285 <p>
286 If one of the identifiers listed is not a recognized property
287 name or is not an animatable property, the implementation must
288 still start transitions on the animatable properties in the
289 list using the duration, delay, and timing function at their
290 respective indices in the lists for 'transition-duration',
291 'transition-delay', and 'transition-timing-function'. In other
292 words, unrecognized or non-animatable properties must be kept in
293 the list to preserve the matching of indices.
294 </p>
296 <p>
297 The keywords ''none'', ''inherit'', and ''initial'' are not
298 permitted as items within a list of more that one identifier;
299 any list that uses them is syntactically invalid.
300 In other words, the <IDENT> production in
301 <span><single-transition-property></span> matches any
302 identifier other than these three keywords.
303 </p>
305 <p>
306 For the keyword 'all', or if one of the identifiers listed is a
307 shorthand property, implementations must start transitions for
308 any of its longhand sub-properties that are animatable (or, for
309 'all', all animatable properties), using the duration, delay,
310 and timing function at the index corresponding to the shorthand.
311 </p>
312 <p>
313 If a property is specified multiple times in the value of
314 'transition-property' (either on its own, via a shorthand that
315 contains it, or via the 'all' value), then the transition that
316 starts uses the duration, delay, and timing function at the
317 index corresponding to the <em>last</em> item in the value of
318 'transition-property' that calls for animating that property.
319 </p>
320 <p class="note">
321 Note: The <code class="property">all</code> value and shorthand
322 properties work in similar ways, so the <code
323 class="property">all</code> value is just like a shorthand that
324 covers all properties.
325 </p>
327 <!-- ======================================================================================================= -->
328 <h3 id="transition-duration-property"><a id="the-transition-duration-property-">
329 The <code class="property">'transition-duration'</code> Property
330 </a></h3>
331 <p>
332 The <code class="property">'transition-duration'</code> property defines the length of time that a transition takes.
333 </p>
334 <table class="propdef">
335 <tbody>
336 <tr>
337 <td>
338 <em>Name:</em>
339 </td>
340 <td>
341 <dfn id="transition-duration">transition-duration</dfn>
342 </td>
343 </tr>
344 <tr>
345 <td>
346 <em>Value:</em>
347 </td>
348 <td>
349 <span><time></span> [, <span><time></span>]*
350 </td>
351 </tr>
352 <tr>
353 <td>
354 <em>Initial:</em>
355 </td>
356 <td>
357 0s
358 </td>
359 </tr>
360 <tr>
361 <td>
362 <em>Applies to:</em>
363 </td>
364 <td>
365 all elements, :before and :after pseudo elements
366 </td>
367 </tr>
368 <tr>
369 <td>
370 <em>Inherited:</em>
371 </td>
372 <td>
373 no
374 </td>
375 </tr>
376 <tr>
377 <td>
378 <em>Animatable:</em>
379 </td>
380 <td>
381 no
382 </td>
383 </tr>
384 <tr>
385 <td>
386 <em>Percentages:</em>
387 </td>
388 <td>
389 N/A
390 </td>
391 </tr>
392 <tr>
393 <td>
394 <em>Media:</em>
395 </td>
396 <td>
397 interactive
398 </td>
399 </tr>
400 <tr>
401 <td>
402 <em>Computed value:</em>
403 </td>
404 <td>
405 Same as specified value.
406 </td>
407 </tr>
408 <tr>
409 <td>
410 <em>Canonical order:</em>
411 </td>
412 <td>
413 <abbr title="follows order of property value definition">per grammar</abbr>
414 </td>
415 </tr>
416 </tbody>
417 </table>
418 <p>
419 This property specifies how long the transition from the old value to the new value should take. By default the value is '0s', meaning that the transition is immediate (i.e. there will be no animation). A negative value for <code class="property">transition-duration</code> renders the declaration invalid.
420 </p>
422 <!-- =======================================================================================================
423 -->
425 <h3 id="transition-timing-function-property"><a id="transition-timing-function_tag">
426 The <code class="property">'transition-timing-function'</code> Property
427 </a></h3>
428 <p>
429 The <code class="property">'transition-timing-function'</code> property
430 describes how the intermediate values used during a transition will be
431 calculated. It allows for a transition to change speed over its
432 duration. These effects are commonly called <em>easing</em> functions.
433 In either case, a mathematical function that provides a smooth curve is
434 used.
435 </p>
436 <p>
437 Timing functions are either defined as a stepping function or
438 a <a
439 href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve#Cubic_B.C3.A9zier_curves">cubic
440 Bézier curve</a>.
441 The timing function takes as its input
442 the current elapsed percentage of the transition duration
443 and outputs the percentage of the way the transition is
444 from its start value to its end value.
445 How this output is used is defined by
446 the <a href="#animatable-types">interpolation rules</a>
447 for the value type.
448 </p>
449 <p>
450 A <a href="http://en.wikipedia.org/wiki/Step_function">stepping</a>
451 function is defined by a number that divides the domain of operation
452 into equally sized intervals. Each subsequent interval is a equal step
453 closer to the goal state. The function also specifies whether the
454 change in output percentage happens at the start or end of the
455 interval (in other words, if 0% on the input percentage is the point
456 of initial change).
457 </p>
458 <div class="figure">
459 <img src="step.png" alt="The step timing function splits
460 the function domain into a number of disjoint straight line
461 segments. steps(1, start) is a function whose
462 output value is 1 for all input values. steps(1, end) is a function whose
463 output value is 0 for all input values less than 1, and output
464 is 1 for the input value of 1. steps(3, start) is a function that
465 divides the input domain into three segments, each 1/3 in length,
466 and 1/3 above the previous segment, with the first segment starting
467 at 1/3. steps(3, end) is a function that
468 divides the input domain into three segments, each 1/3 in length,
469 and 1/3 above the previous segment, with the first segment starting
470 at 0.">
471 </div>
472 <p class="caption">
473 Step timing functions
474 </p>
475 <p>
476 A <a
477 href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve#Cubic_B.C3.A9zier_curves">cubic
478 Bézier curve</a> is defined by four control points, P<sub>0</sub>
479 through P<sub>3</sub> (see Figure 1). P<sub>0</sub> and P<sub>3</sub>
480 are always set to (0,0) and (1,1). The <code class="property">'transition-timing-function'</code> property is used
481 to specify the values for points P<sub>1</sub> and P<sub>2</sub>. These
482 can be set to preset values using the keywords listed below, or can be
483 set to specific values using the <code class="css">'cubic-bezier'</code> function.
484 In the <code class="css">'cubic-bezier'</code> function, P<sub>1</sub> and
485 P<sub>2</sub> are each specified by both an X and Y value.
486 </p>
487 <div class="figure">
488 <img src="TimingFunction.png" alt="The Bézier timing function is a
489 smooth curve from point P0 = (0,0) to point P3 = (1,1). The
490 length and orientation of the line segment P0-P1 determines
491 the tangent and the curvature of the curve at P0 and the
492 line segment P2-P3 does the same at P3.">
493 </div>
494 <p class="caption">
495 Bézier Timing Function Control Points
496 </p>
497 <table class="propdef">
498 <tbody>
499 <tr>
500 <td>
501 <em>Name:</em>
502 </td>
503 <td>
504 <dfn id="transition-timing-function">transition-timing-function</dfn>
505 </td>
506 </tr>
507 <tr>
508 <td>
509 <em>Value:</em>
510 </td>
511 <td>
512 <span><single-transition-timing-function></span> [ ',' <span><single-transition-timing-function></span> ]*
513 </td>
514 </tr>
515 <tr>
516 <td>
517 <em>Initial:</em>
518 </td>
519 <td>
520 ease
521 </td>
522 </tr>
523 <tr>
524 <td>
525 <em>Applies to:</em>
526 </td>
527 <td>
528 all elements, :before and :after pseudo elements
529 </td>
530 </tr>
531 <tr>
532 <td>
533 <em>Inherited:</em>
534 </td>
535 <td>
536 no
537 </td>
538 </tr>
539 <tr>
540 <td>
541 <em>Animatable:</em>
542 </td>
543 <td>
544 no
545 </td>
546 </tr>
547 <tr>
548 <td>
549 <em>Percentages:</em>
550 </td>
551 <td>
552 N/A
553 </td>
554 </tr>
555 <tr>
556 <td>
557 <em>Media:</em>
558 </td>
559 <td>
560 interactive
561 </td>
562 </tr>
563 <tr>
564 <td>
565 <em>Computed value:</em>
566 </td>
567 <td>
568 Same as specified value.
569 </td>
570 </tr>
571 <tr>
572 <td>
573 <em>Canonical order:</em>
574 </td>
575 <td>
576 <abbr title="follows order of property value definition">per grammar</abbr>
577 </td>
578 </tr>
579 </tbody>
580 </table>
581 <div class="prod">
582 <dfn id="single-transition-timing-function"><single-transition-timing-function></dfn> = ease | linear | ease-in | ease-out | ease-in-out | step-start | step-end | steps(<integer>[, [ start | end ] ]?) | cubic-bezier(<number>, <number>, <number>, <number>)
583 </div>
584 <p>
585 The timing functions have the following definitions.
586 </p>
587 <dl>
588 <dt>
589 ease
590 </dt>
591 <dd>
592 The ease function is equivalent to cubic-bezier(0.25, 0.1, 0.25, 1).
593 </dd>
594 <dt>
595 linear
596 </dt>
597 <dd>
598 The linear function is equivalent to cubic-bezier(0, 0, 1, 1).
599 </dd>
600 <dt>
601 ease-in
602 </dt>
603 <dd>
604 The ease-in function is equivalent to cubic-bezier(0.42, 0, 1, 1).
605 </dd>
606 <dt>
607 ease-out
608 </dt>
609 <dd>
610 The ease-out function is equivalent to cubic-bezier(0, 0, 0.58, 1).
611 </dd>
612 <dt>
613 ease-in-out
614 </dt>
615 <dd>
616 The ease-in-out function is equivalent to cubic-bezier(0.42, 0, 0.58, 1)
617 </dd>
618 <dt>
619 step-start
620 </dt>
621 <dd>
622 The step-start function is equivalent to steps(1, start).
623 </dd>
624 <dt>
625 step-end
626 </dt>
627 <dd>
628 The step-end function is equivalent to steps(1, end).
629 </dd>
630 <dt>
631 steps(<integer>[, [ start | end ] ]?)
632 </dt>
633 <dd>
634 Specifies a stepping function, described above, taking two
635 parameters. The first parameter specifies the number of intervals
636 in the function. It must be a positive integer (greater than 0).
637 The second parameter, which is optional, is
638 either the value 'start' or 'end', and specifies the point
639 at which the change of values occur within the interval.
640 If the second parameter is omitted, it is given the value 'end'.
641 </dd>
642 <dt>
643 cubic-bezier(<number>, <number>, <number>, <number>)
644 </dt>
645 <dd>
646 Specifies a <a
647 href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve">cubic-bezier
648 curve</a>. The four values specify points P<sub>1</sub> and
649 P<sub>2</sub> of the curve as (x1, y1, x2, y2). Both x values must be
650 in the range [0, 1] or the definition is invalid. The y values can
651 exceed this range.
652 </dd>
653 </dl><!-- ======================================================================================================= -->
654 <h3 id="transition-delay-property"><a id="the-transition-delay-property-">
655 The <code class="property">'transition-delay'</code> Property
656 </a></h3>
657 <p>
658 The <code class="property">'transition-delay'</code> property defines when the transition will start. It allows a transition to begin execution some some period of time from when it is applied. A <code class="property">'transition-delay'</code> value of '0s' means the transition will execute as soon as the property is changed. Otherwise, the value specifies an offset from the moment the property is changed, and the transition will delay execution by that offset.
659 </p>
660 <p>
661 If the value for <code class="property">'transition-delay'</code> is a negative time offset then the transition will execute the moment the property is changed, but will appear to have begun execution at the specified offset. That is, the transition will appear to begin part-way through its play cycle. In the case where a transition has implied starting values and a negative <code class="property">'transition-delay'</code>, the starting values are taken from the moment the property is changed.
662 </p>
663 <table class="propdef">
664 <tbody>
665 <tr>
666 <td>
667 <em>Name:</em>
668 </td>
669 <td>
670 <dfn id="transition-delay">transition-delay</dfn>
671 </td>
672 </tr>
673 <tr>
674 <td>
675 <em>Value:</em>
676 </td>
677 <td>
678 <span><time></span> [, <span><time></span>]*
679 </td>
680 </tr>
681 <tr>
682 <td>
683 <em>Initial:</em>
684 </td>
685 <td>
686 0s
687 </td>
688 </tr>
689 <tr>
690 <td>
691 <em>Applies to:</em>
692 </td>
693 <td>
694 all elements, :before and :after pseudo elements
695 </td>
696 </tr>
697 <tr>
698 <td>
699 <em>Inherited:</em>
700 </td>
701 <td>
702 no
703 </td>
704 </tr>
705 <tr>
706 <td>
707 <em>Animatable:</em>
708 </td>
709 <td>
710 no
711 </td>
712 </tr>
713 <tr>
714 <td>
715 <em>Percentages:</em>
716 </td>
717 <td>
718 N/A
719 </td>
720 </tr>
721 <tr>
722 <td>
723 <em>Media:</em>
724 </td>
725 <td>
726 interactive
727 </td>
728 </tr>
729 <tr>
730 <td>
731 <em>Computed value:</em>
732 </td>
733 <td>
734 Same as specified value.
735 </td>
736 </tr>
737 <tr>
738 <td>
739 <em>Canonical order:</em>
740 </td>
741 <td>
742 <abbr title="follows order of property value definition">per grammar</abbr>
743 </td>
744 </tr>
745 </tbody>
746 </table><!-- ======================================================================================================= -->
747 <h3 id="transition-shorthand-property"><a id="the-transition-shorthand-property-">
748 The <code class="property">'transition'</code> Shorthand Property
749 </a></h3>
750 <p>
751 The <code class="property">'transition'</code> shorthand property combines the four properties described above into a single property.
752 </p>
753 <table class="propdef">
754 <tbody>
755 <tr>
756 <td>
757 <em>Name:</em>
758 </td>
759 <td>
760 <dfn id="transition">transition</dfn>
761 </td>
762 </tr>
763 <tr>
764 <td>
765 <em>Value:</em>
766 </td>
767 <td>
768 <span><single-transition></span> [ ',' <span><single-transition></span> ]*
769 </td>
770 </tr>
771 <tr>
772 <td>
773 <em>Initial:</em>
774 </td>
775 <td>
776 see individual properties
777 </td>
778 </tr>
779 <tr>
780 <td>
781 <em>Applies to:</em>
782 </td>
783 <td>
784 all elements, :before and :after pseudo elements
785 </td>
786 </tr>
787 <tr>
788 <td>
789 <em>Inherited:</em>
790 </td>
791 <td>
792 no
793 </td>
794 </tr>
795 <tr>
796 <td>
797 <em>Animatable:</em>
798 </td>
799 <td>
800 no
801 </td>
802 </tr>
803 <tr>
804 <td>
805 <em>Percentages:</em>
806 </td>
807 <td>
808 N/A
809 </td>
810 </tr>
811 <tr>
812 <td>
813 <em>Media:</em>
814 </td>
815 <td>
816 interactive
817 </td>
818 </tr>
819 <tr>
820 <td>
821 <em>Computed value:</em>
822 </td>
823 <td>
824 Same as specified value.
825 </td>
826 </tr>
827 <tr>
828 <td>
829 <em>Canonical order:</em>
830 </td>
831 <td>
832 <abbr title="follows order of property value definition">per grammar</abbr>
833 </td>
834 </tr>
835 </tbody>
836 </table>
838 <div class="prod">
839 <dfn id="single-transition"><single-transition></dfn> = [ none | <span><single-transition-property></span> ] || <span><time></span> || <span><single-transition-timing-function></span> || <span><time></span>
840 </div>
842 <p>
843 Note that order is important within the items in this property:
844 the first value that can be parsed as a time is assigned to the
845 transition-duration,
846 and the second value that can be parsed as a time is assigned to
847 transition-delay.
848 </p>
850 <p class="issue">
851 An alternative proposal is to accept the font shorthand approach of
852 using a "/" character between the values of the same type. e.g. 2s/4s would
853 mean a duration of 2 seconds and a delay of 4 seconds.
854 </p>
856 <p>
857 If there is more than one <span><single-transition></span> in the shorthand,
858 and any of the transitions has
859 ''none'' as the <span><single-transition-property></span>,
860 then the declaration is invalid.
861 </p>
863 <h2 id="starting">
864 Starting of transitions
865 </h2>
867 <p>
868 When the computed value of an animatable property changes,
869 implementations must decide what transitions to start based on
870 the values of the 'transition-property', 'transition-duration',
871 'transition-timing-function', and 'transition-delay' properties
872 at the time the animatable property would first have its new
873 computed value.
874 </p>
875 <div class="example" id="manual-reversing-example">
876 <p style="display:none">
877 Example(s):
878 </p>
879 <p>This provides a way for authors to specify different values
880 of the 'transition-*' properties for the “forward”
881 and “reverse” transitions (but see <a
882 href="#reversing">below</a> for special reversing behavior when
883 an <em>incomplete</em> transition is interrupted). Authors can
884 specify the value of 'transition-duration',
885 'transition-timing-function', or 'transition-delay' in the same
886 rule where they specify the value that triggers the transition,
887 or can change these properties at the same time as they change
888 the property that triggers the transition. Since it's the new
889 values of these 'transition-*' properties that affect the
890 transition, these values will be used for the transitions
891 <em>to</em> the associated transitioning values. For example:
892 </p>
893 <pre>li {
894 transition: background-color linear 1s;
895 background: blue;
896 }
897 li:hover {
898 background-color: green;
899 transition-duration: 2s; /* applies to the transition *to* the :hover state */
900 }</pre>
901 <p>
902 When a list item with these style rules enters the :hover
903 state, the computed 'transition-duration' at the time that
904 'background-color' would have its new value ('green') is '2s',
905 so the transition from 'blue' to 'green' takes 2 seconds.
906 However, when the list item leaves the :hover state, the
907 transition from 'green' to 'blue' takes 1 second.
908 </p>
909 </div>
911 <p>
912 When the computed value of a property changes, implementations
913 must start transitions based on the relevant item (see <a
914 href="#transition-property">the definition of
915 'transition-property'</a>) in the computed value of
916 'transition-property'.
917 Corresponding to this item there are
918 computed values of 'transition-duration' and 'transition-delay'
919 (see <a href="#list-matching">the rules on matching lists</a>).
920 Define the <dfn>combined duration</dfn> of the transition
921 as the sum of max('transition-duration', '0s') and 'transition-delay'.
922 When the combined duration is greater than '0s',
923 then a transition starts based on the values of
924 'transition-duration', 'transition-delay',
925 and 'transition-timing-function';
926 in other cases transitions do not occur.
927 </p>
929 <p>
930 Since this specification does not define
931 when computed values change, and thus what changes to
932 computed values are considered simultaneous,
933 authors should be aware that changing any of the transition
934 properties a small amount of time after making a change that
935 might transition can result in behavior that varies between
936 implementations, since the changes might be considered
937 simultaneous in some implementations but not others.
938 </p>
940 <p>
941 Once the transition of a property has started, it must continue
942 running based on the original timing function, duration, and
943 delay, even if the 'transition-timing-function',
944 'transition-duration', or 'transition-delay' property changes
945 before the transition is complete. However, if the
946 'transition-property' property changes such that the transition
947 would not have started, the transition must stop (and the
948 property must immediately change to its final value).
949 </p>
951 <p>
952 Implementations must not start a transition when the computed
953 value of a property changes as a result of declarative animation
954 (as opposed to scripted animation).
955 </p>
957 <p>
958 Implementations also must not start a transition when the
959 computed value changes because it is inherited (directly or
960 indirectly) from another element that is transitioning the same
961 property.
962 </p>
964 <h2 id="reversing">
965 Automatically reversing interrupted transitions
966 </h2>
967 <p>
968 A common type of transition effect is when a running transition is
969 interrupted and the property is reset to its original value. An
970 example is a hover effect on an element, where the pointer enters and
971 exits the element before the effect has completed. If the outgoing and
972 incoming transitions are executed using their specified durations and
973 timing functions, the resulting effect can be distractingly
974 asymmetric. Instead, the expected behavior is that the new transition
975 should be the reverse of what has already executed.
976 </p>
978 <p>
979 If a running transition with duration T, executing so far for duration TE,
980 from state A, to state B, is interrupted by
981 a property change that would start a new transition back to state A, and
982 all the transition attributes are the same (duration, delay and timing function),
983 then the new transition must reverse the effect. The new transition must:
984 </p>
986 <ol>
987 <li>
988 Use the B and A states as its "from" and "to" states respectively. It
989 does not use the current value as its from state, due to the rules below.
990 </li>
991 <li>
992 Execute with the same duration T, but starting as if the transition had
993 already begun, without any transition delay, at the moment which would
994 cause the new transition to finish in TE from the moment of interruption. In other
995 words, the new transition will execute as if it started T-TE in the past.
996 </li>
997 <li>
998 Use a timing function that is the portion of the curve traversed up
999 to the moment of interruption, followed in the opposite direction (towards
1000 the starting point). This will make the transition appear as if it
1001 is playing backwards.
1002 </li>
1003 <li>
1004 Ignore any transition delay.
1005 </li>
1006 </ol>
1008 <p>
1009 For example, suppose there is a transition with a duration of two
1010 seconds. If this transition is interrupted after 0.5 seconds and the
1011 property value assigned to the original value, then the new transition
1012 effect will be the reverse of the original, as if it had begun
1013 1.5 seconds in the past.
1014 </p>
1016 <p>
1017 Note that by using the defined from and to states for the reversing
1018 transition, it is also possible that it may reverse again, if
1019 interrupted; for example, if the transition reversing to state A was
1020 again interrupted by a property change to state B.
1021 </p>
1023 <p class="issue">Issue:
1024 This introduces the concept of reversing a timing function,
1025 which the spec has otherwise resisted doing, and also introduces
1026 a discontinuity between transitions that have
1027 almost completed (which get automatically reversed and thus have
1028 their timing function reversed) and transitions that have fully
1029 completed (where the reversal doesn't lead to the timing
1030 function being reversed). An alternative proposal that avoids
1031 this is to follow the normal timing function algorithm, except
1032 multiply the duration (and also shorten any negative delay) by
1033 the (output) value of the transition timing function of the
1034 incomplete transition at the time it was interrupted, and, to
1035 account for multiple reverses in sequence, to divide by the
1036 shortening applied to the transition being interrupted. For
1037 more details see this thread:
1038 <a href="http://lists.w3.org/Archives/Public/www-style/2009Nov/thread.html#msg302">November 2009 part</a>,
1039 <a href="http://lists.w3.org/Archives/Public/www-style/2009Dec/thread.html#msg319">December 2009 part</a>,
1040 <a href="http://lists.w3.org/Archives/Public/www-style/2010Jan/thread.html#msg136">January 2010 part</a>.
1041 </p>
1043 <h2 id="transition-events"><a id="transition-events-">
1044 Transition Events
1045 </a></h2>
1046 <p>
1047 The completion of a CSS Transition generates a corresponding <a href="http://www.w3.org/TR/DOM-Level-2-Events/events.html">DOM Event</a>.
1048 An event is fired for each property that undergoes a transition.
1049 This allows a content developer to perform actions that synchronize
1050 with the completion of a transition.
1051 </p>
1052 <p>
1053 Each event provides the name of the property the transition is
1054 associated with as well as the duration of the transition.
1055 </p>
1056 <dl>
1057 <dt>
1058 <b>Interface <i><a id="Events-TransitionEvent" name='Events-TransitionEvent'>TransitionEvent</a></i></b>
1059 </dt>
1060 <dd>
1061 <p>
1062 The <code>TransitionEvent</code> interface provides specific contextual information associated with transitions.
1063 </p>
1064 <dl>
1065 <dt>
1066 <b>IDL Definition</b>
1067 </dt>
1068 <dd>
1069 <div class='idl-code'>
1070 <pre>
1071 interface TransitionEvent : Event {
1072 readonly attribute DOMString propertyName;
1073 readonly attribute float elapsedTime;
1074 readonly attribute DOMString pseudoElement;
1075 void initTransitionEvent(in DOMString typeArg,
1076 in boolean canBubbleArg,
1077 in boolean cancelableArg,
1078 in DOMString propertyNameArg,
1079 in float elapsedTimeArg,
1080 in DOMString pseudoElementArg);
1081 };
1082 </pre>
1083 </div>
1084 </dd>
1085 <dt>
1086 <b>Attributes</b>
1087 </dt>
1088 <dd>
1089 <dl>
1090 <dt>
1091 <code class='attribute-name'><a id="Events-TransitionEvent-propertyName" name='Events-TransitionEvent-propertyName'>propertyName</a></code> of type <code>DOMString</code>, readonly
1092 </dt>
1093 <dd>
1094 The name of the CSS property associated with the transition.
1095 </dd>
1096 </dl>
1097 <dl>
1098 <dt>
1099 <code class='attribute-name'><a id="Events-TransitionEvent-elapsedTime" name='Events-TransitionEvent-elapsedTime'>elapsedTime</a></code> of type <code>float</code>, readonly
1100 </dt>
1101 <dd>
1102 The amount of time the transition has been running, in seconds, when this event fired. Note that this value is not affected by the value of <code class="property">transition-delay</code>.
1103 </dd>
1104 </dl>
1105 <dl>
1106 <dt>
1107 <code class='attribute-name'><a id="Events-TransitionEvent-pseudoElement" name='Events-TransitionEvent-pseudoElement'>pseudoElement</a></code> of type <code>DOMString</code>, readonly
1108 </dt>
1109 <dd>
1110 The name (beginning with two colons) of the CSS
1111 pseudo-element on which the transition occured (in
1112 which case the target of the event is that
1113 pseudo-element's corresponding element), or the empty
1114 string if the transition occurred on an element (which
1115 means the target of the event is that element).
1116 </dd>
1117 </dl>
1118 </dd>
1119 <dt>
1120 <b>Methods</b>
1121 </dt>
1122 <dd>
1123 <dl>
1124 <dt>
1125 <code class='method-name'><a id="Events-TransitionEvent-initTransitionEvent" name='Events-TransitionEvent-initTransitionEvent'>initTransitionEvent</a></code>
1126 </dt>
1127 <dd>
1128 <div class='method'>
1129 The <code>initTransitionEvent</code> method is used to
1130 initialize the value of a <code>TransitionEvent</code>
1131 created through the <a
1132 href='http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-DocumentEvent'><code>DocumentEvent</code></a>
1133 interface. This method may only be called before the
1134 <code>TransitionEvent</code> has been dispatched via the
1135 <code>dispatchEvent</code> method, though it may be called
1136 multiple times during that phase if necessary. If called
1137 multiple times, the final invocation takes precedence.
1138 <p class="issue">Should new events being created still
1139 have init*Event methods?</p>
1140 <div class='parameters'>
1141 <b>Parameters</b>
1142 <div class='paramtable'>
1143 <dl>
1144 <dt>
1145 <code class='parameter-name'>typeArg</code> of type <code>DOMString</code>
1146 </dt>
1147 <dd>
1148 Specifies the event type.<br>
1149 </dd>
1150 <dt>
1151 <code class='parameter-name'>canBubbleArg</code> of type <code>boolean</code>
1152 </dt>
1153 <dd>
1154 Specifies whether or not the event can bubble.<br>
1155 </dd>
1156 <dt>
1157 <code class='parameter-name'>cancelableArg</code> of type <code>boolean</code>
1158 </dt>
1159 <dd>
1160 Specifies whether or not the event's default action can be prevented. Since a TransitionEvent
1161 is purely for notification, there is no default action.<br>
1162 </dd>
1163 <dt>
1164 <code class='parameter-name'>propertyNameArg</code> of type <code>DOMString</code>
1165 </dt>
1166 <dd>
1167 Specifies the name of the property associated with the <a href='http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Event'><code>Event</code></a>.
1168 (See the <a href="#Events-TransitionEvent-propertyName">propertyName</a> attribute.)
1169 </dd>
1170 <dt>
1171 <code class='parameter-name'>elapsedTimeArg</code> of type <code>float</code>
1172 </dt>
1173 <dd>
1174 Specifies the amount of time, in seconds, the transition has been running at the time of initialization.
1175 (See the <a href="#Events-TransitionEvent-elapsedTime">elapsedTime</a> attribute.)
1176 </dd>
1177 <dt>
1178 <code class='parameter-name'>pseudoElementArg</code> of type <code>DOMString</code>
1179 </dt>
1180 <dd>
1181 Specifies the pseudo-element on which the
1182 transition occurred.
1183 (See the <a href="#Events-TransitionEvent-pseudoElement">pseudoElement</a> attribute.)
1184 <span class="issue">Does adding this additional argument create any compatibility problems?</span>
1185 </dd>
1186 </dl>
1187 </div>
1188 </div><!-- parameters -->
1189 <div>
1190 <b>No Return Value</b>
1191 </div>
1192 <div>
1193 <b>No Exceptions</b>
1194 </div>
1195 </div><!-- method -->
1196 </dd>
1197 </dl>
1198 </dd>
1199 </dl>
1200 </dd>
1201 </dl>
1202 <p>
1203 There is one type of transition event available.
1204 </p>
1205 <dl>
1206 <dt>
1207 <b>transitionend</b>
1208 </dt>
1209 <dd>
1210 The 'transitionend' event occurs at the completion of the transition. In the
1211 case where a transition is removed before completion, such as if the
1212 transition-property is removed, then the event will not fire.
1213 <ul>
1214 <li>Bubbles: Yes
1215 </li>
1216 <li>Cancelable: Yes
1217 </li>
1218 <li>Context Info: propertyName, elapsedTime
1219 </li>
1220 </ul>
1221 </dd>
1222 </dl>
1224 <h2 id="animatable-types"><a id="animation-of-property-types-">
1225 Animation of property types
1226 </a></h2>
1228 <p>
1229 When interpolating between two values,
1230 <i>V</i><sub>start</sub> and <i>V</i><sub>end</sub>,
1231 interpolation is done using the output <i>p</i> of the timing function,
1232 which gives the portion of the value space
1233 that the interpolation has crossed.
1234 Thus the result of the interpolation is
1235 <i>V</i><sub>res</sub> =
1236 (1 - <i>p</i>) ⋅ <i>V</i><sub>start</sub> +
1237 <i>p</i> ⋅ <i>V</i><sub>end</sub>.
1238 </p>
1240 <p>
1241 However, if this value (<i>V</i><sub>res</sub>)
1242 is outside the allowed range of values for the property,
1243 then it is clamped to that range.
1244 This can occur if <i>p</i> is outside of the range 0 to 1,
1245 which can occur if a timing function is specified
1246 with a <i>y1</i> or <i>y2</i> that is outside the range 0 to 1.
1247 </p>
1249 <p>
1250 The following describes how each property type undergoes transition or
1251 animation.
1252 </p>
1254 <ul>
1255 <li>
1256 <strong>color</strong>: interpolated via red, green, blue and alpha
1257 components (treating each as a number, see below).
1258 The interpolation is done between premultiplied colors
1259 (that is, colors for which the red, green, and blue components
1260 specified have been multiplied by the alpha).
1261 </li>
1262 <li>
1263 <strong>length</strong>: interpolated as real numbers.
1264 </li>
1265 <li>
1266 <strong>percentage</strong>: interpolated as real numbers.
1267 </li>
1268 <li>
1269 <strong>integer</strong>: interpolated via discrete steps (whole
1270 numbers). The interpolation happens in real number space and is
1271 converted to an integer using <code>floor()</code>.
1272 <span class="issue">
1273 This floor behavior is inconsistent with SMIL Animation /
1274 SVG Animation.
1275 </span>
1276 </li>
1277 <li>
1278 <strong>font weight</strong>: interpolated via discrete steps
1279 (multiples of 100). The interpolation happens in real number
1280 space and is converted to an integer by rounding to the
1281 nearest multiple of 100.
1282 <span class="issue">
1283 This round-to-nearest behavior is inconsistent with the
1284 floor behavior used for integer types, but probably should
1285 be consistent (one way or the other).
1286 </span>
1287 </li>
1288 <li>
1289 <strong>number</strong>: interpolated as real (floating point)
1290 numbers.
1291 </li>
1292 <li>
1293 <strong>transform list</strong>: see
1294 CSS Transforms specification [[!CSS3-TRANSFORMS]].
1295 </li>
1296 <li>
1297 <strong>rectangle</strong>: interpolated via the x, y,
1298 width and height components (treating each as a number).
1299 </li>
1300 <li>
1301 <strong>visibility</strong>: if one of the values is
1302 'visible', interpolated as a discrete step where values of the
1303 timing function between 0 and 1 map to 'visible' and other
1304 values of the timing function (which occur only at the
1305 start/end of the transition or as a result of 'cubic-bezier()'
1306 functions with Y values outside of [0, 1]) map to the closer
1307 endpoint; if neither value is 'visible' then not interpolable.
1308 </li>
1309 <li>
1310 <strong>shadow</strong>: interpolated via the color, x, y
1311 and blur components (treating them as color and numbers where
1312 appropriate). In the case where there are lists of shadows,
1313 the shorter list is padded at the end with shadows whose
1314 color is transparent and all lengths (x, y, blur) are 0.
1315 </li>
1316 <li>
1317 <strong>gradient</strong>: interpolated via the
1318 positions and colors of each stop. They must have the same type
1319 (radial or linear) and same number of stops in order to be animated.
1320 <span class="note">Note: [[CSS3-IMAGES]] may extend this
1321 definition.</span>
1322 </li>
1323 <li>
1324 <strong>paint server</strong> (SVG): interpolation is only supported
1325 between: gradient to gradient and color to color. They then
1326 work as above.
1327 </li>
1328 <li>
1329 <strong>list of above types</strong>: If the lists have the
1330 same number of items, each item in the list is interpolated using the
1331 rules above. Otherwise the interpolation is determined by the property
1332 rules. If the property extends its list by repeating values, then this
1333 repeated form will be used in the interpolation (<code class="property">'background-position'</code>
1334 is an example of a property that would transition between lists of different lengths). If
1335 the property does not allow extending its list, then no interpolation
1336 will occur.
1337 </li>
1338 <li>
1339 <strong>a shorthand property</strong>: If any part of a
1340 shorthand can be animated, then interpolation is performed as
1341 if those animatable properties were individually specified.
1342 </li>
1343 </ul>
1345 <p class="issue">Need to add a length-percentage-calc type.</p>
1347 <p>Future specifications may define additional types that can
1348 be animated.</p>
1350 <h2 id="animatable-properties"><a id="animatable-properties-">
1351 Animatable properties
1352 </a></h2>
1354 <!--
1355 As resolved in
1356 http://lists.w3.org/Archives/Public/www-style/2011Sep/0497.html
1357 -->
1358 <p>For properties that exist at the time this specification was
1359 developed, this specification defines whether and how they are
1360 animated. However, future CSS specifications may define
1361 additional properties, additional values for existing properties,
1362 or additional animation behavior of existing values. In order to
1363 describe new animation behaviors and to have the definition of
1364 animation behavior in a more appropriate location, future CSS
1365 specifications should include an "Animatable:" line in the summary
1366 of the property's definition (in addition to the other lines
1367 described in [[CSS21]], <a
1368 href="http://www.w3.org/TR/CSS21/about.html#property-defs">section
1369 1.4.2</a>). This line should say "no" to indicate that a property
1370 cannot be animated or should reference an animation behavior
1371 (which may be one of the behaviors in the <a
1372 href="#animation-of-property-types-">Animation of property
1373 types</a> section above, or may be a new behavior) to define how
1374 the property animates. Such definitions override those given in
1375 this specification.</p>
1377 <h3 id="animatable-css"><a id="properties-from-css-">
1378 Properties from CSS
1379 </a></h3>
1381 <p class="issue">Need to define what listing comma-separated
1382 things here means. In particular, that they only apply when
1383 both values fit the type, and that if one of the values is a
1384 type not listed, or if two of the values are different types,
1385 then the two values cannot be interpolated.</p>
1387 <table class="animatable-properties">
1388 <tr>
1389 <th>Property Name</th>
1390 <th>Type</th>
1391 </tr>
1392 <tr>
1393 <td>background-color</td><td>color</tr>
1394 <tr>
1395 <td>background-position</td><td>percentage, length</td>
1396 </tr>
1397 <tr>
1398 <td>border-bottom-color</td><td>color</td>
1399 </tr>
1400 <tr>
1401 <td>border-bottom-width</td><td>length</td>
1402 </tr>
1403 <tr>
1404 <td>border-left-color</td><td>color</td>
1405 </tr>
1406 <tr>
1407 <td>border-left-width</td><td>length</td>
1408 </tr>
1409 <tr>
1410 <td>border-right-color</td><td>color</td>
1411 </tr>
1412 <tr>
1413 <td>border-right-width</td><td>length</td>
1414 </tr>
1415 <tr>
1416 <td>border-spacing</td><td>length</td>
1417 </tr>
1418 <tr>
1419 <td>border-top-color</td><td>color</td>
1420 </tr>
1421 <tr>
1422 <td>border-top-width</td><td>length</td>
1423 </tr>
1424 <tr>
1425 <td>bottom</td><td>length, percentage</td>
1426 </tr>
1427 <tr>
1428 <td>clip</td><td>rectangle</td>
1429 </tr>
1430 <tr>
1431 <td>color</td><td>color</td>
1432 </tr>
1433 <tr>
1434 <td>crop <span class="issue">css3-content will likely advance slower than this specification, in which case this definition should move there</span></td><td>rectangle</td>
1435 </tr>
1436 <tr>
1437 <td>font-size</td><td>length, percentage</td>
1438 </tr>
1439 <tr>
1440 <td>font-weight</td><td>font weight</td>
1441 </tr>
1442 <tr>
1443 <td>height</td><td>length, percentage</td>
1444 </tr>
1445 <tr>
1446 <td>left</td><td>length, percentage</td>
1447 </tr>
1448 <tr>
1449 <td>letter-spacing</td><td>length</td>
1450 </tr>
1451 <tr>
1452 <td>line-height</td><td>number, length, percentage</td>
1453 </tr>
1454 <tr>
1455 <td>margin-bottom</td><td>length</td>
1456 </tr>
1457 <tr>
1458 <td>margin-left</td><td>length</td>
1459 </tr>
1460 <tr>
1461 <td>margin-right</td><td>length</td>
1462 </tr>
1463 <tr>
1464 <td>margin-top</td><td>length</td>
1465 </tr>
1466 <tr>
1467 <td>max-height</td><td>length, percentage</td>
1468 </tr>
1469 <tr>
1470 <td>max-width</td><td>length, percentage </td>
1471 </tr>
1472 <tr>
1473 <td>min-height</td><td>length, percentage</td>
1474 </tr>
1475 <tr>
1476 <td>min-width</td><td>length, percentage</td>
1477 </tr>
1478 <tr>
1479 <td>opacity</td><td>number</td>
1480 </tr>
1481 <tr>
1482 <td>outline-color</td><td>color</td>
1483 </tr>
1484 <tr>
1485 <td>outline-offset</td><td>length</td>
1486 </tr>
1487 <tr>
1488 <td>outline-width</td><td>length</td>
1489 </tr>
1490 <tr>
1491 <td>padding-bottom</td><td>length</td>
1492 </tr>
1493 <tr>
1494 <td>padding-left</td><td>length</td>
1495 </tr>
1496 <tr>
1497 <td>padding-right</td><td>length</td>
1498 </tr>
1499 <tr>
1500 <td>padding-top</td><td>length</td>
1501 </tr>
1502 <tr>
1503 <td>right</td><td>length, percentage</td>
1504 </tr>
1505 <tr>
1506 <td>text-indent</td><td>length, percentage</td>
1507 </tr>
1508 <tr>
1509 <td>text-shadow</td><td>shadow</td>
1510 </tr>
1511 <tr>
1512 <td>top</td><td>length, percentage</td>
1513 </tr>
1514 <tr>
1515 <td>vertical-align</td><td>length, percentage</td>
1516 </tr>
1517 <tr>
1518 <td>visibility</td><td>visibility</td>
1519 </tr>
1520 <tr>
1521 <td>width</td><td>length, percentage</td>
1522 </tr>
1523 <tr>
1524 <td>word-spacing</td><td>length, percentage</td>
1525 </tr>
1526 <tr>
1527 <td>z-index</td><td>integer</td>
1528 </tr>
1529 </table>
1531 <p class="issue">
1532 This list omits the following properties that Gecko can animate, and
1533 which likely should be included:
1534 background-size,
1535 border-*-radius,
1536 box-shadow,
1537 column-count,
1538 column-gap,
1539 column-rule-color,
1540 column-rule-width,
1541 column-width,
1542 font-size-adjust,
1543 font-stretch,
1544 marker-offset,
1545 text-decoration-color,
1546 transform,
1547 transform-origin.
1548 </p>
1550 <h3 id="animatable-svg"><a id="properties-from-svg-">
1551 Properties from SVG
1552 </a></h3>
1554 <p>
1555 All properties defined as animatable in the SVG specification, provided
1556 they are one of the property types listed above.
1557 </p>
1559 <!-- <table>
1560 <tr>
1561 <th>Property Name</th><th>Type</th>
1562 </tr>
1563 <tr>
1564 <td>stop-color</td><td>color</td>
1565 </tr>
1566 <tr>
1567 <td>stop-opacity</td><td>float</td>
1568 </tr>
1569 <tr>
1570 <td>fill</td><td>paint server</td>
1571 </tr>
1572 <tr>
1573 <td>fill-opacity</td><td>float</td>
1574 </tr>
1575 <tr>
1576 <td>stroke</td><td>paint server</td>
1577 </tr>
1578 <tr>
1579 <td>stroke-dasharray</td><td>list of numbers</td>
1580 </tr>
1581 <tr>
1582 <td>stroke-dashoffset</td><td>number</td>
1583 </tr>
1584 <tr>
1585 <td>stroke-miterlimit</td><td>number</td>
1586 </tr>
1587 <tr>
1588 <td>stroke-opacity</td><td>float</td>
1589 </tr>
1590 <tr>
1591 <td>stroke-width</td><td>float</td>
1592 </tr>
1593 <tr>
1594 <td>viewport-fill</td><td>color</td>
1595 </tr>
1596 <tr>
1597 <td>viewport-fill-opacity</td><td>color</td>
1598 </tr>
1599 </table> -->
1601 <h2 id="acknowledgments">Acknowledgments</h2>
1603 <p>Thanks especially to the feedback from
1604 Tab Atkins,
1605 Carine Bournez,
1606 Aryeh Gregor,
1607 Vincent Hardy,
1608 Cameron McCormack,
1609 Alex Mogilevsky,
1610 and all the rest of the
1611 <a href="http://lists.w3.org/Archives/Public/www-style/">www-style</a> community.</p>
1613 <h2 id="references">References</h2>
1615 <h3 class="no-num" id="normative-references">Normative references</h3>
1616 <!--normative-->
1618 <h3 class="no-num" id="other-references">Other references</h3>
1619 <!--informative-->
1623 <h2 class="no-num" id="property-index">Property index</h2>
1624 <!-- properties -->
1628 <h2 class="no-num" id="index">Index</h2>
1629 <!--index-->
1631 </body>
1632 </html>
1633 <!-- Keep this comment at the end of the file
1634 Local variables:
1635 mode: sgml
1636 sgml-default-doctype-name:"html"
1637 sgml-minimize-attributes:t
1638 End:
1639 -->