css3-transitions/Overview.src.html

Mon, 14 Jan 2013 16:29:21 -0800

author
Tab Atkins <jackalmage@gmail.com>
date
Mon, 14 Jan 2013 16:29:21 -0800
changeset 7183
6013bb8b5fe9
parent 7182
a38c76f0336b
child 7297
e941140de034
permissions
-rw-r--r--

[css3-transitions] markup tweak - quote all the id values, so ST2 syntax highlighting works correctly.

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

mercurial