Skip to content

Commit e35539c

Browse files
committed
Define how longhands and shorthands interact when calculating keyframe effect values
This closes w3c#136
1 parent 486d120 commit e35539c

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

Overview.src.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4463,6 +4463,32 @@ <h4 id="the-effect-value-of-a-keyframe-animation-effect">The effect value of
44634463
operation</a>, produces the <a>underlying value</a>.
44644464
1. Let <var>property-specific keyframes</var> be a copy of the list
44654465
of <a>keyframes</a> specified on the effect.
4466+
1. For each <var>keyframe</var> in <var>property-specific keyframes</var>
4467+
replace any shorthand properties in <var>keyframe</var> with the
4468+
equivalent expanded longhand properties.
4469+
4470+
For example, if <var>keyframe</var> has a value &lsquo;4px&rsquo;
4471+
for the 'border-width' property, this property should be removed from
4472+
<var>keyframe</var> and 'border-bottom-width', 'border-left-width',
4473+
'border-right-width', and 'border-top-width' properties added, each with
4474+
the value &lsquo;4px&rsquo;.
4475+
4476+
If conflicts arise when expanding shorthand properties due to
4477+
shorthand properties overlapping with existing longhand properties or
4478+
other with other shorthand properties, apply the following rules in order
4479+
until the conflict is resolved:
4480+
4481+
1. Longhand properties override shorthand properties (e.g.
4482+
'border-top-color' overrides 'border-top').
4483+
1. Shorthand properties with fewer longhand components override those
4484+
with more longhand components (e.g. 'border-top' overrides
4485+
'border-color')
4486+
1. For shorthand properties with an equal number of longhand
4487+
components, properties whose IDL name (see the <a>CSS property to
4488+
IDL attribute</a> algorithm [[!CSSOM]]) appears earlier when
4489+
sorted in ascending order by the Unicode codepoints that make up
4490+
each IDL name, override those who appear later.
4491+
44664492
1. Remove any <a>keyframes</a> from <var>property-specific
44674493
keyframes</var> that do not have a property value for
44684494
<var>target property</var> or for which the property value is

0 commit comments

Comments
 (0)