Re: [css-animations] Multiple identifiers per @keyframes rule

> On Oct 20, 2015, at 4:16 pm, Lea Verou <lea@verou.me> wrote:
> 
> Use case: [1] (applying the same animation when a checkbox is checked AND unchecked). Many similar use cases exist, for each pseudo-class (I’ve come across this before for :hover and :not(:hover), as well as for :focus and probably more).
> 
> Being able to have multiple names per @keyframes rule would eliminate the duplication of having two identical @keyframes rules without forcing us to completely rethink animations to accomodate such use cases.
> 
> YES, it’s totally a hack, as the intent here is event-based animation. But the use cases are many and valid. Authors do need this, and the answer cannot be “Just learn JS and use WebAnim”. That’s a huge barrier there for non-programmers, who will instead resort to duplicating their @keyframes rule, because it’s simpler (especially if they’re using some sort of preprocessor). However, we also cannot completely rethink css-animations at this point. So, I think it’s a reasonable, easy to implement, compromise.
> 
> Thoughts?
> 
> [1]: http://dabblet.com/gist/24c756eb35a67e34d7a9 <http://dabblet.com/gist/24c756eb35a67e34d7a9>
I’m not sure I understand.

You’re asking for:

@keyframes name, name1 {…}

but why is having two sets of identical keyframes useful? Are you just trying to re-trigger an animation by forcing a name change?

Simon

Received on Wednesday, 21 October 2015 16:42:54 UTC