fix(animation): avoid partial keyframes (#19169)

* ensure custom props not part of final keyframes

* fix clear

* clean up
This commit is contained in:
Liam DeBeasi
2019-08-23 12:48:20 -04:00
committed by GitHub
parent c610406ba6
commit f2cfdf1bad
5 changed files with 19 additions and 112 deletions

View File

@ -138,7 +138,12 @@ export const iosTransitionAnimation = (navEl: HTMLElement, opts: TransitionOptio
enteringToolBarBg
.beforeClearStyles([OPACITY])
.fromTo(OPACITY, 0.01, 1, true);
.keyframes([
{ offset: 0, opacity: 0.01 },
{ offset: 0.99, opacity: 1 },
{ offset: 1, opacity: 'var(--opacity)' }
// TODO: Find a way to support clearing properties from Web Animations
]);
// forward direction, entering page has a back button
enteringBackButton.fromTo(OPACITY, 0.01, 1);