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

Animations: apply calc/var transforms to keyframes and timing #9496

Merged
merged 3 commits into from May 24, 2017

Conversation

dvoytenko
Copy link
Contributor

Partial for #9129.

"transform": "translateX(0px)"
}
"keyframes": [
{"transform": "translateY(var(--start-y))", "opacity": "var(--start-o)"},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super !

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack!

@@ -17,6 +17,20 @@
const FINAL_URL_RE = /^(data|https)\:/i;
const DEG_TO_RAD = 2 * Math.PI / 360;
const GRAD_TO_RAD = Math.PI / 200;
const VAR_CSS_RE = /calc|var|url/i;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/calc(|var(|url(/i to avoid false positives likes font-variant CSS property.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Though false positives here are very benign.

this.parsedCssCache_ = map();

/** @private {?Element} */
this.current_ = null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: currentTarget_

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@dvoytenko
Copy link
Contributor Author

/cc @lexandera

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

Successfully merging this pull request may close these issues.

None yet

4 participants