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

[css-cascade] Change the precedence order of cascading origins to match reality better? #1658

Closed
SelenIT opened this issue Jul 28, 2017 · 3 comments

Comments

@SelenIT
Copy link
Collaborator

SelenIT commented Jul 28, 2017

Currently, the CSS Cascade spec states that animation declarations shouldn't override important author declarations. In fact, they do in all browsers except Firefox. There are some articles that appear to describe this overriding as a standard behavior (1, 2), so devs may start to believe that this is how it should be (e.g. 3). The Chrome bug about this has been reported in 2015, but still there seems to be no visible intent to fix it. Unfortunately I have no data if the corresponding bugs were reported to Safari and Edge.

Wouldn't it be easier to change the behavior of Firefox than to persuade all other browser vendors to change their behavior according to the current spec? Wouldn't it make sense to change the spec to match the reality of the majority of the browsers?

@emilio
Copy link
Collaborator

emilio commented Jul 28, 2017

Well, chrome (probably WK too?) really has more bugs wrt animations, that really go into the same bucket of "you should consider also which rules are in the other levels of the cascade before animating, not just the existing computed style"...

<!doctype html>
<style>
@keyframes bounce {
  from { font-size: 10px; }
  to { font-size: 40px; }
}

div {
  width: 10em;
  height: 10em;
  background: red;
  animation: bounce infinite 5s ease;
}
</style>
<div></div>

@tabatkins
Copy link
Member

Yeah, Chrome considers its current behavior a bug, actually. I'd prefer to keep the spec as-is for now.

@SelenIT
Copy link
Collaborator Author

SelenIT commented Sep 5, 2017

Well, if Chrome team agrees that it's a bug, I'd ask to close this issue. But... can't the CSSWG help prioritize these animation-related bugs for Chrome team and get them fixed eventually? :)

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

No branches or pull requests

4 participants