css-transitions/Overview.src.html

Sat, 08 Jun 2013 11:18:20 +0900

author
L. David Baron <dbaron@dbaron.org>
date
Sat, 08 Jun 2013 11:18:20 +0900
changeset 8380
ae77d6a3ead3
parent 8348
a4a465256333
child 9048
7730c3fca2a1
permissions
-rw-r--r--

[css-transitions] Note editing that needs to be done, and add reversing demo used for making decision.

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

mercurial