-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
✨ amp-animation internals can take a scope element #27887
Conversation
Hey @newmuis, these files were changed:
|
@@ -60,7 +64,7 @@ const DEFAULT_EASING = 'cubic-bezier(0.4, 0.0, 0.2, 1)'; | |||
* TODO(alanorozco): maybe memoize? | |||
*/ | |||
export function hasAnimations(element) { | |||
const selector = `${ANIMATABLE_ELEMENTS_SELECTOR},amp-story-animation`; | |||
const selector = `${ANIMATABLE_ELEMENTS_SELECTOR},>amp-story-animation`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL that scopedQuerySelector
accepts comma-separated selectors. This is cool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been able for a little over a year now, I think :)
Partial for #27758
Builder
now takes options:{scope: (!Node|undefined)}
. This scopes the selector in the effect spec.<amp-story-animation>
scopes to its parent<amp-story-page>
.