-
Notifications
You must be signed in to change notification settings - Fork 707
/
Copy pathOverview.html
3029 lines (2137 loc) · 157 KB
/
Overview.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>CSS Transitions</title>
<meta content="refining" name="csswg-work-status">
<meta content="ED" name="w3c-status">
<link href="../default.css" rel="stylesheet" type="text/css">
<link href="../csslogo.ico" rel="shortcut icon" type="image/x-icon">
<style>
body {
background: url("https://www.w3.org/StyleSheets/TR/logo-ED") top left no-repeat white;
background-attachment: fixed;
color: black;
font-family: sans-serif;
margin: 0 auto;
max-width: 50em;
padding: 2em 1em 2em 70px;
}
:link { color: #00C; background: transparent }
:visited { color: #609; background: transparent }
a[href]:active { color: #C00; background: transparent }
a[href]:hover { background: #ffa }
a[href] img { border-style: none }
h1, h2, h3, h4, h5, h6 { text-align: left }
h1, h2, h3 { color: #005A9C; }
h1 { font: 170% sans-serif }
h2 { font: 140% sans-serif }
h3 { font: 120% sans-serif }
h4 { font: bold 100% sans-serif }
h5 { font: italic 100% sans-serif }
h6 { font: small-caps 100% sans-serif }
.hide { display: none }
div.head { margin-bottom: 1em }
div.head h1 { margin-top: 2em; clear: both }
div.head table { margin-left: 2em; margin-top: 2em }
p.copyright { font-size: small }
p.copyright small { font-size: small }
pre { margin-left: 2em }
dt { font-weight: bold }
ul.toc, ol.toc {
list-style: none;
}
</style>
<meta content="Bikeshed 1.0.0" name="generator">
<script defer="" src="//test.csswg.org/harness/annotate.js#css-transitions-1_dev/css-transitions-1" type="text/javascript"></script>
<style type="text/css">
table.animatable-properties {
border-collapse: collapse;
}
table.animatable-properties td {
padding: 0.2em 1em;
border: 1px solid black;
}
div.prod { margin: 1em 2em; }
</style>
</head>
<body class="h-entry">
<div class="head">
<p data-fill-with="logo"><a class="logo" href="http://www.w3.org/">
<img alt="W3C" height="48" src="https://www.w3.org/Icons/w3c_home" width="72">
</a>
</p>
<h1 class="p-name no-ref" id="title">CSS Transitions</h1>
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft,
<time class="dt-updated" datetime="2015-08-12">12 August 2015</time></span></h2>
<div data-fill-with="spec-metadata">
<dl>
<dt>This version:
<dd><a class="u-url" href="http://dev.w3.org/csswg/css-transitions/">http://dev.w3.org/csswg/css-transitions/</a>
<dt>Latest version:
<dd><a href="http://www.w3.org/TR/css3-transitions/">http://www.w3.org/TR/css3-transitions/</a>
<dt>Previous Versions:
<dd><a href="http://www.w3.org/TR/2013/WD-css3-transitions-20131119/" rel="previous">http://www.w3.org/TR/2013/WD-css3-transitions-20131119/</a>
<dt>Feedback:
<dd><span><a href="mailto:www-style@w3.org?subject=%5Bcss-transitions%5D%20YOUR%20TOPIC%20HERE">www-style@w3.org</a> with subject line “<kbd>[css-transitions] <var>… message topic …</var></kbd>” (<a href="http://lists.w3.org/Archives/Public/www-style/" rel="discussion">archives</a>)</span>
<dt>Test Suite:
<dd><a href="http://test.csswg.org/suites/css-transitions-1_dev/nightly-unstable/">http://test.csswg.org/suites/css-transitions-1_dev/nightly-unstable/</a>
<dt>Issue Tracking:
<dd><a href="https://www.w3.org/Bugs/Public/buglist.cgi?query_format=advanced&amp;product=CSS&amp;component=Transitions&amp;resolution=---&amp;status_whiteboard=defer%20to%20level%202&amp;status_whiteboard_type=notregexp">Bugzilla bugs for this level</a>
<dd><a href="https://www.w3.org/Bugs/Public/buglist.cgi?query_format=advanced&amp;product=CSS&amp;component=Transitions&amp;resolution=---">Bugzilla bugs for all levels</a>
<dd><a href="https://github.com/w3c/csswg-drafts/issues/">GitHub</a>
<dd><a href="#issues-index">Inline In Spec</a>
<dt class="editor">Editors:
<dd class="editor p-author h-card vcard"><a class="p-name fn u-url url" href="http://dbaron.org/">L. David Baron</a> (<span class="p-org org">Mozilla</span>)
<dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:dino@apple.com">Dean Jackson</a> (<span class="p-org org">Apple Inc</span>)
<dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:hyatt@apple.com">David Hyatt</a> (<span class="p-org org">Apple Inc</span>)
<dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:cmarrin@apple.com">Chris Marrin</a> (<span class="p-org org">Apple Inc</span>)
</dl>
</div>
<div data-fill-with="warning"></div>
<p class="copyright" data-fill-with="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2015 <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="http://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>). W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.
</p>
<hr title="Separator for header">
</div>
<h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
<div class="p-summary" data-fill-with="abstract">
<p>CSS Transitions allows property changes in CSS values to occur smoothly over a specified duration.</p>
<a href="http://www.w3.org/TR/CSS/">CSS</a> is a language for describing the rendering of structured documents
(such as HTML and XML)
on screen, on paper, in speech, etc.</div>
<h2 class="no-num no-toc no-ref heading settled" id="status"><span class="content">Status of this document</span></h2>
<div data-fill-with="status">
<p>
This is a public copy of the editors’ draft.
It is provided for discussion only and may change at any moment.
Its publication here does not imply endorsement of its contents by W3C.
Don’t cite this document other than as work in progress.
</p>
<p>
The (<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) public mailing list
<a href="mailto:www-style@w3.org?Subject=%5Bcss-transitions%5D%20PUT%20SUBJECT%20HERE">www-style@w3.org</a>
(see <a href="http://www.w3.org/Mail/Request">instructions</a>)
is preferred for discussion of this specification.
When sending e-mail,
please put the text “css-transitions” in the subject,
preferably like this:
“[css-transitions] <em>…summary of comment…</em>”
</p>
<p>
This document was produced by the <a href="http://www.w3.org/Style/CSS/members">CSS Working Group</a>
(part of the <a href="http://www.w3.org/Style/">Style Activity</a>).
</p>
<p>
This document was produced by a group operating under
the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent Policy</a>.
W3C maintains a <a href="http://www.w3.org/2004/01/pp-impl/32061/status" rel="disclosure">public list of any patent disclosures</a>
made in connection with the deliverables of the group;
that page also includes instructions for disclosing a patent.
An individual who has actual knowledge of a patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a>
must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the W3C Patent Policy</a>.
</p>
<p>
This document is governed by the <a href="http://www.w3.org/2014/Process-20140801/" id="w3c_process_revision">1 August 2014 W3C Process Document</a>.
</p>
<p>
<strong>This document</strong> is expected to be relatively close to last call. While some issues raised have yet to be addressed, new features are extremely unlikely to be considered for this level. </p>
<p>The following behaviors are at risk: </p>
<ul>
<li><a href="#discrete-interpolation-at-risk">Interpolation in steps of property types that cannot be interpolated</a>
</ul>
</div>
<div data-fill-with="at-risk"></div>
<h2 class="no-num no-toc no-ref heading settled" id="contents"><span class="content">Table of Contents</span></h2>
<div data-fill-with="table-of-contents" role="navigation">
<ul class="toc" role="directory">
<li><a href="#introduction"><span class="secno">1</span> <span class="content">Introduction</span></a>
<li><a href="#transitions"><span class="secno">2</span> <span class="content"><span>Transitions</span></span></a>
<ul class="toc">
<li><a href="#transition-property-property"><span class="secno">2.1</span> <span class="content"><span>
The <span class="property">transition-property</span> Property
</span></span></a>
<li><a href="#transition-duration-property"><span class="secno">2.2</span> <span class="content"><span>
The <span class="property">transition-duration</span> Property
</span></span></a>
<li><a href="#transition-timing-function-property"><span class="secno">2.3</span> <span class="content"><span>
The <span class="property">transition-timing-function</span> Property
</span></span></a>
<li><a href="#transition-delay-property"><span class="secno">2.4</span> <span class="content"><span>
The <span class="property">transition-delay</span> Property
</span></span></a>
<li><a href="#transition-shorthand-property"><span class="secno">2.5</span> <span class="content"><span>
The <span class="property">transition</span> Shorthand Property
</span></span></a>
</ul>
<li><a href="#starting"><span class="secno">3</span> <span class="content">
Starting of transitions
</span></a>
<ul class="toc">
<li><a href="#reversing"><span class="secno">3.1</span> <span class="content">
Faster reversing of interrupted transitions
</span></a>
</ul>
<li><a href="#application"><span class="secno">4</span> <span class="content">
Application of transitions
</span></a>
<li><a href="#complete"><span class="secno">5</span> <span class="content">Completion of transitions</span></a>
<li><a href="#transition-events"><span class="secno">6</span> <span class="content"><span>
Transition Events
</span></span></a>
<li><a href="#animatable-types"><span class="secno">7</span> <span class="content"><span>
Animation of property types
</span></span></a>
<ul class="toc">
<li><a href="#interpolated-types"><span class="secno">7.1</span> <span class="content">Animation of interpolated property types</span></a>
<li><a href="#step-types"><span class="secno">7.2</span> <span class="content">Animation in steps of other property types</span></a>
</ul>
<li><a href="#animatable-properties"><span class="secno">8</span> <span class="content"><span>
Animatable properties
</span></span></a>
<ul class="toc">
<li><a href="#animatable-css"><span class="secno">8.1</span> <span class="content"><span>
Properties from CSS
</span></span></a>
<li><a href="#animatable-svg"><span class="secno">8.2</span> <span class="content"><span>
Properties from SVG
</span></span></a>
</ul>
<li><a href="#changes"><span class="secno">9</span> <span class="content">Changes since Working Draft of 19 November 2013</span></a>
<li><a href="#acknowledgments"><span class="secno">10</span> <span class="content">Acknowledgments</span></a>
<li><a href="#conformance"><span class="secno"></span> <span class="content">
Conformance</span></a>
<ul class="toc">
<li><a href="#conventions"><span class="secno"></span> <span class="content">
Document conventions</span></a>
<li><a href="#conformance-classes"><span class="secno"></span> <span class="content">
Conformance classes</span></a>
<li><a href="#partial"><span class="secno"></span> <span class="content">
Partial implementations</span></a>
<li><a href="#experimental"><span class="secno"></span> <span class="content">
Experimental implementations</span></a>
<li><a href="#testing"><span class="secno"></span> <span class="content">
Non-experimental implementations</span></a>
</ul>
<li><a href="#index"><span class="secno"></span> <span class="content">Index</span></a>
<ul class="toc">
<li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a>
<li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a>
</ul>
<li><a href="#references"><span class="secno"></span> <span class="content">References</span></a>
<ul class="toc">
<li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
<li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a>
</ul>
<li><a href="#property-index"><span class="secno"></span> <span class="content">Property Index</span></a>
<li><a href="#idl-index"><span class="secno"></span> <span class="content">IDL Index</span></a>
<li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a>
</ul></div>
<main>
<h2 class="heading settled" data-level="1" id="introduction"><span class="secno">1. </span><span class="content">Introduction</span><a class="self-link" href="#introduction"></a></h2>
<p><em>This section is not normative.</em>
</p>
<p>
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.
</p>
<h2 class="heading settled" data-level="2" id="transitions"><span class="secno">2. </span><span class="content"><span id="transitions-">Transitions</span></span><a class="self-link" href="#transitions"></a></h2>
<p>
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.
</p>
<p>
For example, suppose that transitions of one second have been defined on the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css2/visuren.html#propdef-left">left</a> and
<a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css2/colors.html#propdef-background-color">background-color</a> 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.
</p>
<div class="figure">
<img alt="" src="transition1.png">
</div>
<p class="caption">
Transitions of <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css2/visuren.html#propdef-left">left</a> and <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css2/colors.html#propdef-background-color">background-color</a>
</p>
<p>
Transitions are a presentational effect. The <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-4/#computed-value">computed value</a> of a property transitions over time from the old value to the new value. Therefore if a script queries the <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-4/#computed-value">computed value</a> of a property (or other data depending on it) as it is transitioning, it will see an intermediate value that represents the current animated value of the property.
</p>
<p>
Only animatable CSS properties can be transitioned. See the table at the end of this document for a list
of properties that are animatable.
</p>
<p>
The transition for a property is defined using a number of new properties. For example:
</p>
<div class="example" id="example-a2052cf7"><a class="self-link" href="#example-a2052cf7"></a>
<p style="display:none">
Example(s):
</p>
<pre>div {
transition-property: opacity;
transition-duration: 2s;
}
</pre>
The above example defines a transition on the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-color-3/#opacity">opacity</a> 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.
</div>
<p>
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:
</p>
<div class="example" id="example-d2b84941"><a class="self-link" href="#example-d2b84941"></a>
<p style="display:none">
Example(s):
</p>
<pre>div {
transition-property: opacity, left;
transition-duration: 2s, 4s;
}
</pre>
This will cause the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-color-3/#opacity">opacity</a> property to transition over a period of two seconds and the left property to transition over a period of four seconds.
</div>
<p id="list-matching">
In the case where the lists of values in transition properties
do not have the same length, the length of the
<a class="property" data-link-type="propdesc" href="#propdef-transition-property">transition-property</a> list determines the number of items in
each list examined when starting transitions. The lists are
matched up from the first value: excess values at the end are
not used. If one of the other properties doesn’t have enough
comma-separated values to match the number of values of
<a class="property" data-link-type="propdesc" href="#propdef-transition-property">transition-property</a>, the UA must calculate its used value by
repeating the list of values until there are enough. This
truncation or repetition does not affect the computed value.
<span class="note" role="note">
Note: This is analogous to the behavior of the <a class="property" data-link-type="propdesc">background-*</a>
properties, with <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-backgrounds-3/#background-image">background-image</a> analogous to
<a class="property" data-link-type="propdesc" href="#propdef-transition-property">transition-property</a>.
</span>
</p>
<div class="example" id="example-62e0c8fb"><a class="self-link" href="#example-62e0c8fb"></a>
<p style="display:none">
Example(s):
</p>
<pre>div {
transition-property: opacity, left, top, width;
transition-duration: 2s, 1s;
}
</pre>
The above example defines a transition on the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-color-3/#opacity">opacity</a> property of 2 seconds duration, a transition on the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css2/visuren.html#propdef-left">left</a> property of 1
second duration, a transition on the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css2/visuren.html#propdef-top">top</a> property of 2 seconds duration and a
transition on the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css2/visudet.html#propdef-width">width</a> property of 1
second duration.
</div>
<p>
While authors can use transitions to create dynamically changing content,
dynamically changing content can lead to seizures in some users.
For information on how to avoid content that can lead to seizures, see
<a href="http://www.w3.org/TR/WCAG20/#seizure">Guideline 2.3:
Seizures:
Do not design content in a way that is known to cause seizures</a>
(<a data-link-type="biblio" href="#biblio-wcag20">[WCAG20]</a>).
</p>
<h3 class="heading settled" data-level="2.1" id="transition-property-property"><span class="secno">2.1. </span><span class="content"><span id="the-transition-property-property-">
The <a class="property" data-link-type="propdesc" href="#propdef-transition-property">transition-property</a> Property
</span></span><a class="self-link" href="#transition-property-property"></a></h3>
<p>
The <a class="property" data-link-type="propdesc" href="#propdef-transition-property">transition-property</a> property specifies the name of the CSS property to which the transition is applied.
</p>
<table class="definition propdef" data-link-for-hint="transition-property">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-transition-property">transition-property<a class="self-link" href="#propdef-transition-property"></a></dfn>
<tr class="value">
<th>Value:
<td class="prod"><a class="css" data-link-type="maybe" href="#valdef-transition-property-none">none</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <a class="production css" data-link-type="type" href="#single-transition-property"><single-transition-property></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-comma">#</a>
<tr>
<th>Initial:
<td><a class="css" data-link-type="maybe" href="#valdef-transition-property-all">all</a>
<tr>
<th>Applies to:
<td>all elements, ::before and ::after pseudo elements
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>Same as specified value.
<tr>
<th>Animatable:
<td>no
<tr>
<th>Canonical order:
<td><abbr title="follows order of property value definition">per grammar</abbr></table>
<div class="prod">
<dfn class="css" data-dfn-type="type" data-export="" id="single-transition-property"><single-transition-property><a class="self-link" href="#single-transition-property"></a></dfn> = <a class="css" data-link-type="maybe" href="#valdef-transition-property-all">all</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#identifier-value"><custom-ident></a>;
</div>
<p>
A value of
<dfn class="css" data-dfn-for="transition-property" data-dfn-type="value" data-export="" id="valdef-transition-property-none">none<a class="self-link" href="#valdef-transition-property-none"></a></dfn>
means that no property will transition.
Otherwise, a list of properties to be transitioned, or the
keyword <dfn class="css" data-dfn-for="transition-property" data-dfn-type="value" data-export="" id="valdef-transition-property-all">all<a class="self-link" href="#valdef-transition-property-all"></a></dfn>
which indicates that all properties are to be
transitioned, is given.
</p>
<p>
If one of the identifiers listed is not a recognized property
name or is not an animatable property, the implementation must
still start transitions on the animatable properties in the
list using the duration, delay, and timing function at their
respective indices in the lists for <a class="property" data-link-type="propdesc" href="#propdef-transition-duration">transition-duration</a>,
<a class="property" data-link-type="propdesc" href="#propdef-transition-delay">transition-delay</a>, and <a class="property" data-link-type="propdesc" href="#propdef-transition-timing-function">transition-timing-function</a>. In other
words, unrecognized or non-animatable properties must be kept in
the list to preserve the matching of indices.
</p>
<p>
The <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#identifier-value"><custom-ident></a> production in <a class="production css" data-link-type="type" href="#single-transition-property"><single-transition-property></a>
also excludes the keyword <a class="css" data-link-type="maybe" href="#valdef-transition-property-none">none</a>,
in addition to the keywords always excluded from <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#identifier-value"><custom-ident></a>.
This means that
<a class="css" data-link-type="maybe" href="#valdef-transition-property-none">none</a>, <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-cascade-4/#valdef-all-inherit">inherit</a>, and <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-cascade-4/#valdef-all-initial">initial</a> are not
permitted as items within a list of more that one identifier;
any list that uses them is syntactically invalid.
</p>
<p>
For the keyword <a class="css" data-link-type="maybe" href="#valdef-transition-property-all">all</a>,
or if one of the identifiers listed is a
shorthand property, implementations must start transitions for
any of its longhand sub-properties that are animatable (or, for
<a class="css" data-link-type="maybe" href="#valdef-transition-property-all">all</a>, all animatable properties), using the duration, delay,
and timing function at the index corresponding to the shorthand.
</p>
<p>
If a property is specified multiple times in the value of
<a class="property" data-link-type="propdesc" href="#propdef-transition-property">transition-property</a> (either on its own, via a shorthand that
contains it, or via the <a class="css" data-link-type="maybe" href="#valdef-transition-property-all">all</a> value), then the transition that
starts uses the duration, delay, and timing function at the
index corresponding to the <em>last</em> item in the value of
<a class="property" data-link-type="propdesc" href="#propdef-transition-property">transition-property</a> that calls for animating that property.
</p>
<p class="note" role="note">
Note: The <a class="css" data-link-type="maybe" href="#valdef-transition-property-all">all</a> value and <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-cascade-4/#propdef-all">all</a> shorthand
property work in similar ways, so the
<a class="css" data-link-type="maybe" href="#valdef-transition-property-all">all</a> value is just like a shorthand that
covers all properties.
</p>
<h3 class="heading settled" data-level="2.2" id="transition-duration-property"><span class="secno">2.2. </span><span class="content"><span id="the-transition-duration-property-">
The <a class="property" data-link-type="propdesc" href="#propdef-transition-duration">transition-duration</a> Property
</span></span><a class="self-link" href="#transition-duration-property"></a></h3>
<p>
The <a class="property" data-link-type="propdesc" href="#propdef-transition-duration">transition-duration</a> property defines the length of time that a transition takes.
</p>
<table class="definition propdef" data-link-for-hint="transition-duration">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-transition-duration">transition-duration<a class="self-link" href="#propdef-transition-duration"></a></dfn>
<tr class="value">
<th>Value:
<td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#time-value"><time></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-comma">#</a>
<tr>
<th>Initial:
<td><span class="css">0s</span>
<tr>
<th>Applies to:
<td>all elements, ::before and ::after pseudo elements
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>interactive
<tr>
<th>Computed value:
<td>Same as specified value.
<tr>
<th>Animatable:
<td>no
<tr>
<th>Canonical order:
<td><abbr title="follows order of property value definition">per grammar</abbr></table>
<p>
This property specifies how long the transition from the old value to the new value should take. By default the value is <span class="css">0s</span>, meaning that the transition is immediate (i.e. there will be no animation). A negative value for <a class="property" data-link-type="propdesc" href="#propdef-transition-duration">transition-duration</a> renders the declaration invalid.
</p>
<h3 class="heading settled" data-level="2.3" id="transition-timing-function-property"><span class="secno">2.3. </span><span class="content"><span id="transition-timing-function_tag">
The <a class="property" data-link-type="propdesc" href="#propdef-transition-timing-function">transition-timing-function</a> Property
</span></span><a class="self-link" href="#transition-timing-function-property"></a></h3>
<p>
The <a class="property" data-link-type="propdesc" href="#propdef-transition-timing-function">transition-timing-function</a> property
describes how the intermediate values used during a transition will be
calculated. It allows for a transition to change speed over its
duration. These effects are commonly called <em>easing</em> functions.
In either case, a mathematical function that provides a smooth curve is
used.
</p>
<p>
Timing functions are either defined as a stepping function or
a <a href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve#Cubic_B.C3.A9zier_curves">cubic
Bézier curve</a>.
The timing function takes as its input
the current elapsed percentage of the transition duration
and outputs the percentage of the way the transition is
from its start value to its end value.
How this output is used is defined by
the <a href="#animatable-types">interpolation rules</a>
for the value type.
</p>
<p>
A <a href="http://en.wikipedia.org/wiki/Step_function">stepping</a>
function is defined by a number that divides the domain of operation
into equally sized intervals. Each subsequent interval is a equal step
closer to the goal state. The function also specifies whether the
change in output percentage happens at the start or end of the
interval (in other words, if 0% on the input percentage is the point
of initial change).
</p>
<div class="figure">
<img alt="The step timing function splits
the function domain into a number of disjoint straight line
segments. steps(1, start) is a function whose
output value is 1 for all input values. steps(1, end) is a function whose
output value is 0 for all input values less than 1, and output
is 1 for the input value of 1. steps(3, start) is a function that
divides the input domain into three segments, each 1/3 in length,
and 1/3 above the previous segment, with the first segment starting
at 1/3. steps(3, end) is a function that
divides the input domain into three segments, each 1/3 in length,
and 1/3 above the previous segment, with the first segment starting
at 0." src="step.png">
</div>
<p class="caption">
Step timing functions
</p>
<p>
A <a href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve#Cubic_B.C3.A9zier_curves">cubic
Bézier curve</a> is defined by four control points, P<sub>0</sub>
through P<sub>3</sub> (see Figure 1). P<sub>0</sub> and P<sub>3</sub>
are always set to (0,0) and (1,1). The <a class="property" data-link-type="propdesc" href="#propdef-transition-timing-function">transition-timing-function</a> property is used
to specify the values for points P<sub>1</sub> and P<sub>2</sub>. These
can be set to preset values using the keywords listed below, or can be
set to specific values using the <a class="css" data-link-type="maybe" href="#funcdef-cubic-bezier">cubic-bezier()</a> function.
In the <a class="css" data-link-type="maybe" href="#funcdef-cubic-bezier">cubic-bezier()</a> function, P<sub>1</sub> and
P<sub>2</sub> are each specified by both an X and Y value.
</p>
<div class="figure">
<img alt="The Bézier timing function is a
smooth curve from point P0 = (0,0) to point P3 = (1,1). The
length and orientation of the line segment P0-P1 determines
the tangent and the curvature of the curve at P0 and the
line segment P2-P3 does the same at P3." src="TimingFunction.png">
</div>
<p class="caption">
Bézier Timing Function Control Points
</p>
<table class="definition propdef" data-link-for-hint="transition-timing-function">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-transition-timing-function">transition-timing-function<a class="self-link" href="#propdef-transition-timing-function"></a></dfn>
<tr class="value">
<th>Value:
<td class="prod"><a class="production css" data-link-type="type" href="#single-transition-timing-function" title="Expands to: linear | step-start | cubic-bezier() | ease | ease-out | step-end | ease-in-out | ease-in | steps()"><single-transition-timing-function></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-comma">#</a>
<tr>
<th>Initial:
<td><a class="css" data-link-type="maybe" href="#valdef-transition-timing-function-ease">ease</a>
<tr>
<th>Applies to:
<td>all elements, ::before and ::after pseudo elements
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>interactive
<tr>
<th>Computed value:
<td>Same as specified value.
<tr>
<th>Animatable:
<td>no
<tr>
<th>Canonical order:
<td><abbr title="follows order of property value definition">per grammar</abbr></table>
<div class="prod">
<dfn class="css" data-dfn-type="type" data-export="" id="single-transition-timing-function"><single-transition-timing-function><a class="self-link" href="#single-transition-timing-function"></a></dfn> = <a class="css" data-link-type="maybe" href="#valdef-transition-timing-function-ease">ease</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <a class="css" data-link-type="maybe" href="#valdef-transition-timing-function-linear">linear</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <a class="css" data-link-type="maybe" href="#valdef-transition-timing-function-ease-in">ease-in</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <a class="css" data-link-type="maybe" href="#valdef-transition-timing-function-ease-out">ease-out</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <a class="css" data-link-type="maybe" href="#valdef-transition-timing-function-ease-in-out">ease-in-out</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <a class="css" data-link-type="maybe" href="#valdef-transition-timing-function-step-start">step-start</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <a class="css" data-link-type="maybe" href="#valdef-transition-timing-function-step-end">step-end</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <a class="css" data-link-type="function" href="#funcdef-steps">steps</a>(<a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#integer-value"><integer></a>[<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-comma">,</a> [ <a class="css" data-link-type="maybe" href="#valdef-steps-start">start</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <a class="css" data-link-type="maybe" href="#valdef-steps-end">end</a> ] ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-opt">?</a>) <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <a class="css" data-link-type="function" href="#funcdef-cubic-bezier">cubic-bezier</a>(<a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#number-value"><number></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-comma">,</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#number-value"><number></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-comma">,</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#number-value"><number></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-comma">,</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#number-value"><number></a>)
</div>
<p>
The timing functions have the following definitions.
</p>
<dl>
<dt><dfn class="css" data-dfn-for="transition-timing-function, <single-transition-timing-function>" data-dfn-type="value" data-export="" id="valdef-transition-timing-function-ease">ease<a class="self-link" href="#valdef-transition-timing-function-ease"></a></dfn>
<dd>
The ease function is equivalent to <a class="css" data-link-type="function" href="#funcdef-cubic-bezier">cubic-bezier(0.25, 0.1, 0.25, 1)</a>.
<dt><dfn class="css" data-dfn-for="transition-timing-function, <single-transition-timing-function>" data-dfn-type="value" data-export="" id="valdef-transition-timing-function-linear">linear<a class="self-link" href="#valdef-transition-timing-function-linear"></a></dfn>
<dd>
The linear function is equivalent to <a class="css" data-link-type="function" href="#funcdef-cubic-bezier">cubic-bezier(0, 0, 1, 1)</a>.
<dt><dfn class="css" data-dfn-for="transition-timing-function, <single-transition-timing-function>" data-dfn-type="value" data-export="" id="valdef-transition-timing-function-ease-in">ease-in<a class="self-link" href="#valdef-transition-timing-function-ease-in"></a></dfn>
<dd>
The ease-in function is equivalent to <a class="css" data-link-type="function" href="#funcdef-cubic-bezier">cubic-bezier(0.42, 0, 1, 1)</a>.
<dt><dfn class="css" data-dfn-for="transition-timing-function, <single-transition-timing-function>" data-dfn-type="value" data-export="" id="valdef-transition-timing-function-ease-out">ease-out<a class="self-link" href="#valdef-transition-timing-function-ease-out"></a></dfn>
<dd>
The ease-out function is equivalent to <a class="css" data-link-type="function" href="#funcdef-cubic-bezier">cubic-bezier(0, 0, 0.58, 1)</a>.
<dt><dfn class="css" data-dfn-for="transition-timing-function, <single-transition-timing-function>" data-dfn-type="value" data-export="" id="valdef-transition-timing-function-ease-in-out">ease-in-out<a class="self-link" href="#valdef-transition-timing-function-ease-in-out"></a></dfn>
<dd>
The ease-in-out function is equivalent to <a class="css" data-link-type="function" href="#funcdef-cubic-bezier">cubic-bezier(0.42, 0, 0.58, 1)</a>.
<dt><dfn class="css" data-dfn-for="transition-timing-function, <single-transition-timing-function>" data-dfn-type="value" data-export="" id="valdef-transition-timing-function-step-start">step-start<a class="self-link" href="#valdef-transition-timing-function-step-start"></a></dfn>
<dd>
The step-start function is equivalent to <a class="css" data-link-type="function" href="#funcdef-steps">steps(1, start)</a>.
<dt><dfn class="css" data-dfn-for="transition-timing-function, <single-transition-timing-function>" data-dfn-type="value" data-export="" id="valdef-transition-timing-function-step-end">step-end<a class="self-link" href="#valdef-transition-timing-function-step-end"></a></dfn>
<dd>
The step-end function is equivalent to <a class="css" data-link-type="function" href="#funcdef-steps">steps(1, end)</a>.
<dt><dfn class="css" data-dfn-for="transition-timing-function, <single-transition-timing-function>" data-dfn-type="function" data-export="" data-lt="steps()" id="funcdef-steps">steps(<a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#integer-value"><integer></a>[, [ start | end ] ]?)<a class="self-link" href="#funcdef-steps"></a></dfn>
<dd>
Specifies a stepping function, described above, taking two
parameters. The first parameter specifies the number of intervals
in the function. It must be a positive integer (greater than 0).
The second parameter, which is optional, is
either the value <dfn class="css" data-dfn-for="steps()" data-dfn-type="value" data-export="" id="valdef-steps-start">start<a class="self-link" href="#valdef-steps-start"></a></dfn> or <dfn class="css" data-dfn-for="steps()" data-dfn-type="value" data-export="" id="valdef-steps-end">end<a class="self-link" href="#valdef-steps-end"></a></dfn>, and specifies the point
at which the change of values occur within the interval.
If the second parameter is omitted, it is given the value <a class="css" data-link-type="maybe" href="#valdef-steps-end">end</a>.
<dt><dfn class="css" data-dfn-for="transition-timing-function, <single-transition-timing-function>" data-dfn-type="function" data-export="" data-lt="cubic-bezier()" id="funcdef-cubic-bezier">cubic-bezier(<a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#number-value"><number></a>, <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#number-value"><number></a>, <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#number-value"><number></a>, <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#number-value"><number></a>)<a class="self-link" href="#funcdef-cubic-bezier"></a></dfn>
<dd>
Specifies a <a href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve">cubic-bezier
curve</a>. The four values specify points P<sub>1</sub> and
P<sub>2</sub> of the curve as (x1, y1, x2, y2). Both x values must be
in the range [0, 1] or the definition is invalid. The y values can
exceed this range.
</dl>
<h3 class="heading settled" data-level="2.4" id="transition-delay-property"><span class="secno">2.4. </span><span class="content"><span id="the-transition-delay-property-">
The <a class="property" data-link-type="propdesc" href="#propdef-transition-delay">transition-delay</a> Property
</span></span><a class="self-link" href="#transition-delay-property"></a></h3>
<p>
The <a class="property" data-link-type="propdesc" href="#propdef-transition-delay">transition-delay</a> 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 <a class="property" data-link-type="propdesc" href="#propdef-transition-delay">transition-delay</a> value of <span class="css">0s</span> 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.
</p>
<p>
If the value for <a class="property" data-link-type="propdesc" href="#propdef-transition-delay">transition-delay</a> 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 <a class="property" data-link-type="propdesc" href="#propdef-transition-delay">transition-delay</a>, the starting values are taken from the moment the property is changed.
</p>
<table class="definition propdef" data-link-for-hint="transition-delay">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-transition-delay">transition-delay<a class="self-link" href="#propdef-transition-delay"></a></dfn>
<tr class="value">
<th>Value:
<td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#time-value"><time></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-comma">#</a>
<tr>
<th>Initial:
<td><span class="css">0s</span>
<tr>
<th>Applies to:
<td>all elements, ::before and ::after pseudo elements
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>interactive
<tr>
<th>Computed value:
<td>Same as specified value.
<tr>
<th>Animatable:
<td>no
<tr>
<th>Canonical order:
<td><abbr title="follows order of property value definition">per grammar</abbr></table>
<h3 class="heading settled" data-level="2.5" id="transition-shorthand-property"><span class="secno">2.5. </span><span class="content"><span id="the-transition-shorthand-property-">
The <a class="property" data-link-type="propdesc" href="#propdef-transition">transition</a> Shorthand Property
</span></span><a class="self-link" href="#transition-shorthand-property"></a></h3>
<p>
The <a class="property" data-link-type="propdesc" href="#propdef-transition">transition</a> shorthand property combines the four properties described above into a single property.
</p>
<table class="definition propdef" data-link-for-hint="transition">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-transition">transition<a class="self-link" href="#propdef-transition"></a></dfn>
<tr class="value">
<th>Value:
<td class="prod"><a class="production css" data-link-type="type" href="#single-transition"><single-transition></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-comma">#</a>
<tr>
<th>Initial:
<td>see individual properties
<tr>
<th>Applies to:
<td>all elements, ::before and ::after pseudo elements
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>interactive
<tr>
<th>Computed value:
<td>see individual properties
<tr>
<th>Animatable:
<td>no
<tr>
<th>Canonical order:
<td><abbr title="follows order of property value definition">per grammar</abbr></table>
<div class="prod">
<dfn class="css" data-dfn-type="type" data-export="" id="single-transition"><single-transition><a class="self-link" href="#single-transition"></a></dfn> = [ <a class="css" data-link-type="maybe" href="#valdef-transition-property-none">none</a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <a class="production css" data-link-type="type" href="#single-transition-property"><single-transition-property></a> ] <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-any">||</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#time-value"><time></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-any">||</a> <a class="production css" data-link-type="type" href="#single-transition-timing-function" title="Expands to: linear | step-start | cubic-bezier() | ease | ease-out | step-end | ease-in-out | ease-in | steps()"><single-transition-timing-function></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-any">||</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#time-value"><time></a>
</div>
<p>
Note that order is important within the items in this property:
the first value that can be parsed as a time is assigned to the
transition-duration,
and the second value that can be parsed as a time is assigned to
transition-delay.
</p>
<p>
If there is more than one <a class="production css" data-link-type="type" href="#single-transition"><single-transition></a> in the shorthand,
and any of the transitions has
<a class="css" data-link-type="maybe" href="#valdef-transition-property-none">none</a> as the <a class="production css" data-link-type="type" href="#single-transition-property"><single-transition-property></a>,
then the declaration is invalid.
</p>
<h2 class="heading settled" data-level="3" id="starting"><span class="secno">3. </span><span class="content">
Starting of transitions
</span><a class="self-link" href="#starting"></a></h2>
<p>
Implementations must maintain a set of
<dfn data-dfn-type="dfn" data-export="" data-lt="running transition" id="running-transition">running transitions<a class="self-link" href="#running-transition"></a></dfn>,
each of which applies to a specific element and non-shorthand
property. Each of these transitions also has a
<dfn data-dfn-for="transition" data-dfn-type="dfn" data-export="" id="start-time">start time<a class="self-link" href="#start-time"></a></dfn>, <dfn data-dfn-for="transition" data-dfn-type="dfn" data-export="" id="end-time">end time<a class="self-link" href="#end-time"></a></dfn>,
<dfn data-dfn-for="transition" data-dfn-type="dfn" data-export="" id="start-value">start value<a class="self-link" href="#start-value"></a></dfn>, <dfn data-dfn-for="transition" data-dfn-type="dfn" data-export="" id="end-value">end value<a class="self-link" href="#end-value"></a></dfn>,
<dfn data-dfn-for="transition" data-dfn-type="dfn" data-export="" id="reversing_adjusted-start-value">reversing-adjusted start value<a class="self-link" href="#reversing_adjusted-start-value"></a></dfn>, and <dfn data-dfn-for="transition" data-dfn-type="dfn" data-export="" id="reversing-shortening-factor">reversing shortening factor<a class="self-link" href="#reversing-shortening-factor"></a></dfn>.
Transitions are added to this set as described in this section,
and are removed from this set
when they <a data-link-type="dfn" href="#dfn-complete">complete</a>
or when implementations are required to <dfn data-dfn-for="transition" data-dfn-type="dfn" data-export="" id="cancel">cancel<a class="self-link" href="#cancel"></a></dfn> them.
<span class="note" role="note">
For the rationale behind the <a data-link-type="dfn" href="#reversing_adjusted-start-value">reversing-adjusted start value</a>
and <a data-link-type="dfn" href="#reversing-shortening-factor">reversing shortening factor</a>, see <a href="#reversing">§3.1 Faster reversing of interrupted transitions</a>.
</span>
</p>
<p>
Implementations must also maintain a set of
<dfn data-dfn-type="dfn" data-export="" data-lt="completed transition" id="completed-transition">completed transitions<a class="self-link" href="#completed-transition"></a></dfn>,
each of which
(like <a data-link-type="dfn" href="#running-transition">running transitions</a>)
applies to a specific element and non-shorthand property.
<span class="note" role="note">
This specification maintains the invariant that
there is never both a <a data-link-type="dfn" href="#running-transition">running transition</a> and
a <a data-link-type="dfn" href="#completed-transition">completed transition</a> for the same property and element.
</span>
</p>
<p>
If an element is no longer in the document,
implementations must remove transitions on it
from the <a data-link-type="dfn" href="#running-transition">running transitions</a> and the
<a data-link-type="dfn" href="#completed-transition">completed transitions</a>.
</p>
<div class="note" role="note">
<p>
This set of completed transitions
needs to be maintained
in order to prevent
transitions from repeating themselves in certain cases,
i.e., to maintain the invariant
that this specification tries to maintain
that unrelated style changes do not trigger transitions.
</p>
<p class="example" id="example-14047527"><a class="self-link" href="#example-14047527"></a>
An example where maintaining the set of completed transitions
is necessary would be a transition on
an inherited property,
where the parent specifies a transition of that property for
a longer duration (say, <a class="css" data-link-type="propdesc" href="#propdef-transition">transition: 4s text-indent</a>)
and a child element that inherits the parent’s value specifies
a transition of the same property for a shorter duration
(say, <a class="css" data-link-type="propdesc" href="#propdef-transition">transition: 1s text-indent</a>).
Without the maintenance of this set of completed transitions,
implementations could start additional transitions on the child
after the initial 1 second transition on the child completes.
</p>
</div>
<p>
Various things can cause the <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-4/#computed-value">computed values</a> of properties
on an element to change.
These include
insertion and removal of elements from the document tree
(which both changes whether those elements have <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-4/#computed-value">computed values</a> and
can change the styles of other elements through selector matching),
changes to the document tree that cause
changes to which selectors match elements,
changes to style sheets or style attributes,
and other things.
This specification does not define when <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-4/#computed-value">computed values</a> are updated,
beyond saying that implementations must not
use, present, or display something resulting from the CSS
cascading, value computation, and inheritance process <a data-link-type="biblio" href="#biblio-css3cascade">[CSS3CASCADE]</a>
without updating the <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-4/#computed-value">computed value</a>
(which means merely that implementations cannot avoid
meeting requirements of this specification
by claiming not to have updated the <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-4/#computed-value">computed value</a>
as part of handling a style change).
However,
when an implementation updates the <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-4/#computed-value">computed value</a> of a
property on an element
to reflect one of these changes,