w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.46k stars 657 forks source link

[css-animations-2] it should be possible to set `animation-composition` using the `animation` shorthand #6929

Open graouts opened 2 years ago

graouts commented 2 years ago

The CSS Animations Level 2 spec introduces the animation-composition but does not support the newly introduced <single-animation-composition> value to be set using the animation shorthand property.

I believe this is an oversight and will propose a spec edit to allow animation-composition to be set using the animation shorthand just like other animation- properties.

graouts commented 2 years ago

I have some WPT coverage written up in https://github.com/graouts/wpt/commit/9b0d0d4f16178870b7968bd924b672ff78e0090d.

devongovett commented 4 months ago

I was just working on implementing a parser for this and noticed the same thing. The spec includes examples for animation-composition values in the animation shorthand here: https://drafts.csswg.org/css-animations-2/#animation-composition, but it is not included in the grammar for the shorthand: https://drafts.csswg.org/css-animations-2/#animation-shorthand. Which one is right?

ydaniv commented 4 months ago

The example seems to be ahead of its time.

@dbaron any reason not to add composition to the shorthand's grammar? Is there a risk in introducing new keywords that could collide with name?