Skip to content

Commit d129f87

Browse files
committed
[css-transitions][css-animations] Properties that cannot be interpolated transition at the midpoint of the timing function.
This is as resolved in: https://lists.w3.org/Archives/Public/www-style/2012Nov/0261.html https://lists.w3.org/Archives/Public/www-style/2014Oct/0290.html
1 parent 853b0f1 commit d129f87

4 files changed

Lines changed: 161 additions & 12 deletions

File tree

css-animations/Overview.bs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,13 @@ Keyframes</h2>
308308
{T}{O} {return TO_SYM;}
309309
</pre>
310310

311+
<p class="issue">
312+
This specification needs to define
313+
how the value is determined from the keyframes,
314+
like the section on
315+
<a href="http://dev.w3.org/csswg/css-transitions/#application">Application of transitions</a>
316+
does for CSS Transitions.
317+
</p>
311318

312319
<h3 id="timing-functions">
313320
Timing functions for keyframes</h3>
@@ -1124,7 +1131,7 @@ Working Group Resolutions that are pending editing</h2>
11241131
<li>2014-09-09 minutes (Antibes f2f)
11251132
<ul>
11261133
<li>Detail how/when keyframe values are computed; using <a href="http://lists.w3.org/Archives/Public/www-style/2014Aug/0132.html">G.beta in dbaron's mail</a>
1127-
<li>Agreed that both transitions and animations animate all properties. css-transitions to define animation of non-interoperable/discrete values. They take their starting values below 50% timing function progress, and end values above
1134+
<li><del>Agreed that both transitions and animations animate all properties. css-transitions to define animation of non-interoperable/discrete values. They take their starting values below 50% timing function progress, and end values above</del>
11281135
<li><del>Dynamic changes to animation properties/keyframes. Tab to propose resolution. (<a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=14713">Bug 14713</a>)
11291136
<li><del>Negative animation-delay values apply against the active duration of the animation i.e. (animation-duration*animation-iteration-count). The delay can thus swallow iterations for which no iteration event will be fired. The start/end events are still fired. Even when delay == (-1*active_duration)
11301137
<li><del>Fire animation start/end events when animation-duration is zero, with 0 elapsedTime

css-animations/Overview.html

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ <h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="cont
9494
<dd><span><a href="mailto:www-style@w3.org?subject=%5Bcss-animations%5D%20YOUR%20TOPIC%20HERE">www-style@w3.org</a> with subject line “<kbd>[css-animations] <var>… message topic …</var></kbd>” (<a href="http://lists.w3.org/Archives/Public/www-style/" rel="discussion">archives</a>)</span>
9595
<dt>Test Suite:
9696
<dd><a href="http://test.csswg.org/suites/css-animations-1_dev/nightly-unstable/">http://test.csswg.org/suites/css-animations-1_dev/nightly-unstable/</a>
97+
<dt>Issue Tracking:
98+
<dd><a href="#issues-index">Inline In Spec</a>
9799
<dt class="editor">Editors:
98100
<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>)
99101
<dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:dbaron@dbaron.org">L. David Baron</a> (<span class="p-org org">Mozilla</span>)
@@ -294,6 +296,7 @@ <h2 class="no-num no-toc no-ref heading settled" id="contents"><span class="cont
294296
</ul>
295297
<li><a href="#property-index"><span class="secno"></span> <span class="content">Property Index</span></a>
296298
<li><a href="#idl-index"><span class="secno"></span> <span class="content">IDL Index</span></a>
299+
<li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a>
297300
</ul></div>
298301

299302
<main>
@@ -632,6 +635,14 @@ <h2 class="heading settled" data-level="4" id="keyframes"><span class="secno">4.
632635
{T}{O} {return TO_SYM;}
633636
</pre>
634637

638+
639+
<p class="issue" id="issue-9bda05d2"><a class="self-link" href="#issue-9bda05d2"></a>
640+
This specification needs to define
641+
how the value is determined from the keyframes,
642+
like the section on
643+
<a href="http://dev.w3.org/csswg/css-transitions/#application">Application of transitions</a>
644+
does for CSS Transitions.
645+
</p>
635646

636647

637648
<h3 class="heading settled" data-level="4.1" id="timing-functions"><span class="secno">4.1. </span><span class="content">
@@ -1893,7 +1904,9 @@ <h2 class="heading settled" data-level="8" id="wg-resolutions-pending"><span cla
18931904

18941905
<li>Detail how/when keyframe values are computed; using <a href="http://lists.w3.org/Archives/Public/www-style/2014Aug/0132.html">G.beta in dbaron’s mail</a>
18951906

1896-
<li>Agreed that both transitions and animations animate all properties. css-transitions to define animation of non-interoperable/discrete values. They take their starting values below 50% timing function progress, and end values above
1907+
<li>
1908+
<del>Agreed that both transitions and animations animate all properties. css-transitions to define animation of non-interoperable/discrete values. They take their starting values below 50% timing function progress, and end values above</del>
1909+
18971910

18981911
<li>
18991912
<del>Dynamic changes to animation properties/keyframes. Tab to propose resolution. (<a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=14713">Bug 14713</a>)
@@ -2481,5 +2494,15 @@ <h2 class="no-num heading settled" id="idl-index"><span class="content">IDL Inde
24812494
<a data-link-type="idl-name" href="#csskeyframerule">CSSKeyframeRule</a>? <a class="idl-code" data-global-name="CSSKeyframesRule<interface>/findRule(select)<method>" data-link-type="method" href="#dom-csskeyframesrule-findruleselect">findRule</a>(DOMString <a class="idl-code" data-global-name="CSSKeyframesRule<interface>/findRule(select)<method>/select<argument>" data-link-type="argument" href="#dom-csskeyframesrule-findruleselect-select">select</a>);
24822495
};
24832496

2484-
</pre></body>
2497+
</pre>
2498+
<h2 class="no-num heading settled" id="issues-index"><span class="content">Issues Index</span><a class="self-link" href="#issues-index"></a></h2>
2499+
<div style="counter-reset:issue">
2500+
<div class="issue">
2501+
This specification needs to define
2502+
how the value is determined from the keyframes,
2503+
like the section on
2504+
<a href="http://dev.w3.org/csswg/css-transitions/#application">Application of transitions</a>
2505+
does for CSS Transitions.
2506+
<a href="#issue-9bda05d2"></a></div>
2507+
</div></body>
24852508
</html>

css-transitions/Overview.bs

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Editor: Chris Marrin, Apple Inc, cmarrin@apple.com
2828
Issue Tracking: Bugzilla bugs for this level 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
2929
Issue Tracking: Bugzilla bugs for all levels https://www.w3.org/Bugs/Public/buglist.cgi?query_format=advanced&amp;product=CSS&amp;component=Transitions&amp;resolution=---
3030
Abstract: CSS Transitions allows property changes in CSS values to occur smoothly over a specified duration.
31-
Status Text: <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.
31+
Status Text: <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>The following behaviors are at risk: <ul><li><a href="#discrete-interpolation-at-risk">Interpolation in steps of property types that cannot be interpolated</a></li></ul>
3232
Ignored Terms: float
3333
</pre>
3434
<!-- FIXME: font-size and font-weight link defaults don't work -->
@@ -1245,6 +1245,15 @@ url: https://html.spec.whatwg.org/multipage/infrastructure.html#concept-event-di
12451245
Animation of property types
12461246
</span></h2>
12471247

1248+
<p>
1249+
Some property types can be interpolated,
1250+
which means they can animate smoothly from one value to another.
1251+
Other property types cannot, and thus animate only in a single
1252+
step from one value to the other.
1253+
</p>
1254+
1255+
<h3 id="interpolated-types">Animation of interpolated property types</h3>
1256+
12481257
<p>
12491258
When interpolating between two values,
12501259
<var>V</var><sub>start</sub> and <var>V</var><sub>end</sub>,
@@ -1389,6 +1398,30 @@ url: https://html.spec.whatwg.org/multipage/infrastructure.html#concept-event-di
13891398
of shorthand properties and the ''all'' value is applied to any
13901399
properties (in the shorthand) that can be animated.</p>
13911400

1401+
<h3 id="step-types">Animation in steps of other property types</h3>
1402+
1403+
<p>
1404+
When interpolating between two values that cannot be interpolated,
1405+
<var>V</var><sub>start</sub> and <var>V</var><sub>end</sub>,
1406+
interpolation is done using the output <var>p</var> of the timing function.
1407+
If <var>p</var> is less than 0.5, then the
1408+
result of the interpolation is
1409+
<var>V</var><sub>start</sub>;
1410+
if <var>p</var> is greater than or equal to 0.5, then the
1411+
result of the interpolation is
1412+
<var>V</var><sub>end</sub>.
1413+
</p>
1414+
1415+
<p class="note" id="discrete-interpolation-at-risk">
1416+
This is a recent change to which implementations have
1417+
not yet updated. (Prior to the change CSS Transitions
1418+
and CSS Animations did not run on such changes.) It's
1419+
possible that it won't be compatible with existing Web content.
1420+
If that is the case, the problem may be mitigated by restricting
1421+
this behavior only to CSS Animations (and not to CSS Transitions),
1422+
and/or restricting it to step timing functions.
1423+
</p>
1424+
13921425
<h2 id="animatable-properties"><span id="animatable-properties-">
13931426
Animatable properties
13941427
</span></h2>
@@ -1402,15 +1435,21 @@ url: https://html.spec.whatwg.org/multipage/infrastructure.html#concept-event-di
14021435
when the values of that property can be interpolated
14031436
by referring to the definitions of property types
14041437
in the <a href="#animatable-types">previous section</a>.
1405-
Values are animatable when
1438+
The animated value is interpolated from the from and to values when
14061439
both the from and the to values of the property have the type described.
14071440
(When a composite type such as "length, percentage, or calc" is listed,
14081441
this means that both values must fit into that composite type.)
14091442
When multiple types are listed in the form "either A or B",
14101443
both values must be of the same type to be interpolable.</p>
14111444

1445+
<p>Otherwise, since the from and to values cannot be interpolated,
1446+
the animation is done <a href="#step-types">in a single step</a>.</p>
1447+
1448+
<p>The 'transition-*' properties defined in this specification do
1449+
not undergo transitions.</p>
1450+
14121451
<p>For properties that exist at the time this specification was
1413-
developed, this specification defines whether and how they are
1452+
developed, this specification defines how they are
14141453
animated. However, future CSS specifications may define
14151454
additional properties, additional values for existing properties,
14161455
or additional animation behavior of existing values. In order to
@@ -1428,6 +1467,12 @@ url: https://html.spec.whatwg.org/multipage/infrastructure.html#concept-event-di
14281467
the property animates. Such definitions override those given in
14291468
this specification.</p>
14301469

1470+
<p class="issue">
1471+
It no longer makes sense for this line to be called
1472+
"Animatable". It should probably be renamed to "Interpolation",
1473+
and the "no" value renamed to "discrete" or "in steps".
1474+
</p>
1475+
14311476
<h3 id="animatable-css"><span id="properties-from-css-">
14321477
Properties from CSS
14331478
</span></h3>
@@ -1634,6 +1679,7 @@ url: https://html.spec.whatwg.org/multipage/infrastructure.html#concept-event-di
16341679
dated 19 November 2013</a>:</p>
16351680

16361681
<ul>
1682+
<li>Values that cannot be interpolated are transitioned when the timing function crosses its midpoint, instead of not running transitions and changing immediately.</li>
16371683
<li>Canceling and interrupting of running transitions is defined much more precisely. This includes the after-change style no longer including styles from CSS Transitions.</li>
16381684
<li>Completion of transitions is defined somewhat more precisely.</li>
16391685
<li>The transitionend event is no longer cancelable. This is since it has no default action, so canceling it would have no meaning. It also matches the animation events.</li>

0 commit comments

Comments
 (0)