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

Spec that @keyframes takes precedence over @-webkit-keyframes (regardless of ordering) #63

Open
dholbert opened this issue Oct 28, 2016 · 1 comment

Comments

@dholbert
Copy link

dholbert commented Oct 28, 2016

As discovered in https://bugzilla.mozilla.org/show_bug.cgi?id=1312918 , Chrome (and I assume Safari) honors @keyframes rules even if there's a conflicting later @-webkit-keyframes rule with the same name.

This means the following sort of markup...

@keyframes my-anim {
  /* working CSS */
}

@-webkit-keyframes my-anim {
  /* accidentally-imperfect CSS */
}

...will honor the "working CSS" in Chrome (and presumably Safari), despite the fact that the (valid) @-webkit-keyframes rule (with "imperfect CSS") comes later.

We should spec this behavior. From brief testing, when there are naming collisions, I think Chrome does give later rules priority over earlier rules, but it also gives all @keyframes rules priority over all @-webkit-keyframes rules.

Here's a testcase demonstrating this behavior:
https://bug1312918.bmoattachments.org/attachment.cgi?id=8805661
The green/lime animation shown in Chrome is the "working CSS" (which authors may expect from testing their site in Chrome/Safari), and the red/pink animation shown in Firefox 49 and current Edge is the "accidentally-imperfect CSS".

@miketaylr
Copy link
Member

Note: waiting for https://bugzilla.mozilla.org/show_bug.cgi?id=1312918 to be fixed before adding this.

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