Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With webkit prefix, animation name could be an arbitrary string #43

Closed
upsuper opened this issue Mar 8, 2016 · 4 comments
Closed

With webkit prefix, animation name could be an arbitrary string #43

upsuper opened this issue Mar 8, 2016 · 4 comments

Comments

@upsuper
Copy link
Member

upsuper commented Mar 8, 2016

For example, the following code works in WebKit and Blink:

@-webkit-keyframes 'a b' {
  from { background: blue; }
  to { background: green; }
}
div {
  -webkit-animation: 'a b' 2s alternate infinite;
}

and the following code works in WebKit but not Blink:

@keyframes 'a b' {
  from { background: blue; }
  to { background: green; }
}
div {
  animation: 'a b' 2s alternate infinite;
}

Not sure whether it should be an issue for the Compat spec or the CSS Animation spec.

I actually see usage similiar to the first example in this website: http://nipponcolors.com/

@miketaylr
Copy link
Member

Just so I'm up to speed, CSS Animations has the following to say about keyframes names:

A @Keyframes
rule consists of the keyword "@Keyframes", followed by an identifier giving a name for the animation (which will be referenced using animation-name)

Here's the grammar:

keyframes_rule: KEYFRAMES_SYM S+ IDENT S* '{' S* keyframes_blocks '}' S*;

animation-name is defined to take a <single-animation-name> which is either none or <custom-ident>. That's defined here: https://drafts.csswg.org/css-values-3/#identifier-value

@miketaylr
Copy link
Member

My sense is that this should probably be defined, ideally in the Animations spec but we can do it here.

@upsuper
Copy link
Member Author

upsuper commented Nov 26, 2016

CSSWG has accepted w3c/csswg-drafts#118. I think we can close this issue now.

@upsuper upsuper closed this as completed Nov 26, 2016
@miketaylr
Copy link
Member

Cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants