[css-animations] Change ordering requirements for parsing keywords within the animation shorthand to prioritize animation-name lowest, and also require nonambiguous serialization with allowance for being non-minimal (which we could perhaps tighten later).

Wed, 22 Jan 2014 17:13:09 -0800

author
L. David Baron <dbaron@dbaron.org>
date
Wed, 22 Jan 2014 17:13:09 -0800
changeset 9778
68697748c5cc
parent 9777
94b61951036a
child 9779
8546cc88806b

[css-animations] Change ordering requirements for parsing keywords within the animation shorthand to prioritize animation-name lowest, and also require nonambiguous serialization with allowance for being non-minimal (which we could perhaps tighten later).

Fixes:
http://lists.w3.org/Archives/Public/www-style/2014Jan/0325.html
http://lists.w3.org/Archives/Public/www-style/2011Apr/0344.html

css-animations/Overview.html file | annotate | diff | comparison | revisions
css-animations/Overview.src.html file | annotate | diff | comparison | revisions
     1.1 --- a/css-animations/Overview.html	Wed Jan 22 17:10:14 2014 -0800
     1.2 +++ b/css-animations/Overview.html	Wed Jan 22 17:13:09 2014 -0800
     1.3 @@ -1458,11 +1458,10 @@
     1.4    </table>
     1.5  
     1.6    <div class=prod> <dfn id=single-animation>&lt;single-animation&gt;</dfn> =
     1.7 -   &lt;single-animation-name&gt; || <span>&lt;time&gt;</span> ||
     1.8 -   &lt;single-animation-timing-function&gt; || <span>&lt;time&gt;</span> ||
     1.9 -   &lt;single-animation-iteration-count&gt; ||
    1.10 +   <span>&lt;time&gt;</span> || &lt;single-animation-timing-function&gt; ||
    1.11 +   <span>&lt;time&gt;</span> || &lt;single-animation-iteration-count&gt; ||
    1.12     &lt;single-animation-direction&gt; || &lt;single-animation-fill-mode&gt;
    1.13 -   || &lt;single-animation-play-state&gt;</div>
    1.14 +   || &lt;single-animation-play-state&gt; || &lt;single-animation-name&gt;</div>
    1.15  
    1.16    <p> Note that order is important within each animation definition: the
    1.17     first value in each &lt;single-animation&gt; that can be parsed as a
    1.18 @@ -1470,6 +1469,30 @@
    1.19     second value in each &lt;single-animation&gt; that can be parsed as a
    1.20     <var>&lt;time&gt;</var> is assigned to animation-delay.
    1.21  
    1.22 +  <p> Note that order is also important within each animation definition for
    1.23 +   distinguishing &lt;single-animation-name&gt; values from other keywords.
    1.24 +   When parsing, keywords that are valid for properties other than ‘<a
    1.25 +   href="#animation-name"><code class=property>animation-name</code></a>’
    1.26 +   must be accepted for those properties rather than for ‘<a
    1.27 +   href="#animation-name"><code class=property>animation-name</code></a>’.
    1.28 +   Furthermore, when serializing, default values of other properties must be
    1.29 +   output in at least the cases necessary to distinguish an ‘<a
    1.30 +   href="#animation-name"><code class=property>animation-name</code></a>’
    1.31 +   that could be a value of another property, and may be output in additional
    1.32 +   cases. <span class=example> For example, a value parsed from ‘<code
    1.33 +   class=css>animation: 3s none backwards</code>’ (where ‘<a
    1.34 +   href="#animation-fill-mode"><code
    1.35 +   class=property>animation-fill-mode</code></a>’ is ‘<code
    1.36 +   class=css>none</code>’ and ‘<a href="#animation-name"><code
    1.37 +   class=property>animation-name</code></a>’ is ‘<code
    1.38 +   class=css>backwards</code>’) must not be serialized as ‘<code
    1.39 +   class=css>animation: 3s backwards</code>’ (where ‘<a
    1.40 +   href="#animation-fill-mode"><code
    1.41 +   class=property>animation-fill-mode</code></a>’ is ‘<code
    1.42 +   class=css>backwards</code>’ and ‘<a href="#animation-name"><code
    1.43 +   class=property>animation-name</code></a>’ is ‘<code
    1.44 +   class=css>none</code>’). </span>
    1.45 +
    1.46    <p class=issue> Need to also explain how order is important in terms of
    1.47     animation-name versus keywords, and probably also adjust the canonical
    1.48     order to match.
     2.1 --- a/css-animations/Overview.src.html	Wed Jan 22 17:10:14 2014 -0800
     2.2 +++ b/css-animations/Overview.src.html	Wed Jan 22 17:13:09 2014 -0800
     2.3 @@ -1037,14 +1037,14 @@
     2.4  
     2.5  	<div class="prod">
     2.6  		<dfn id="single-animation">&lt;single-animation&gt;</dfn> =
     2.7 -				&lt;single-animation-name&gt; ||
     2.8  				<span>&lt;time&gt;</span> ||
     2.9  				&lt;single-animation-timing-function&gt; ||
    2.10  				<span>&lt;time&gt;</span> ||
    2.11  				&lt;single-animation-iteration-count&gt; ||
    2.12  				&lt;single-animation-direction&gt; ||
    2.13  				&lt;single-animation-fill-mode&gt; ||
    2.14 -				&lt;single-animation-play-state&gt;
    2.15 +				&lt;single-animation-play-state&gt; ||
    2.16 +				&lt;single-animation-name&gt;
    2.17  	</div>
    2.18  
    2.19  	<p>
    2.20 @@ -1057,6 +1057,28 @@
    2.21  		is assigned to animation-delay.
    2.22  	</p>
    2.23  
    2.24 +	<p>
    2.25 +		Note that order is also important within each animation definition
    2.26 +		for distinguishing &lt;single-animation-name&gt; values
    2.27 +		from other keywords.
    2.28 +		When parsing, keywords that are valid for
    2.29 +		properties other than 'animation-name'
    2.30 +		must be accepted for those properties
    2.31 +		rather than for 'animation-name'.
    2.32 +		Furthermore, when serializing,
    2.33 +		default values of other properties must be output
    2.34 +		in at least the cases necessary to distinguish an
    2.35 +		'animation-name' that could be a value of another property,
    2.36 +		and may be output in additional cases.
    2.37 +		<span class="example">
    2.38 +			For example, a value parsed from ''animation: 3s none backwards''
    2.39 +			(where 'animation-fill-mode' is ''none'' and
    2.40 +			'animation-name' is ''backwards'')
    2.41 +			must not be serialized as ''animation: 3s backwards''
    2.42 +			(where 'animation-fill-mode' is ''backwards'' and
    2.43 +			'animation-name' is ''none'').
    2.44 +		</span>
    2.45 +
    2.46  	<p class="issue">
    2.47  		Need to also explain how order is important in terms of animation-name
    2.48  		versus keywords, and probably also adjust the canonical order to

mercurial