From cce55857950fc20344c9c93b3047a547039fb406 Mon Sep 17 00:00:00 2001 From: fragosti Date: Wed, 27 Jun 2018 16:28:54 -0700 Subject: Fix animation when coming from bottom --- packages/website/ts/components/ui/animation.tsx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'packages/website') diff --git a/packages/website/ts/components/ui/animation.tsx b/packages/website/ts/components/ui/animation.tsx index b90437721..943e3bf28 100644 --- a/packages/website/ts/components/ui/animation.tsx +++ b/packages/website/ts/components/ui/animation.tsx @@ -25,12 +25,18 @@ const appearFromBottomFrames = keyframes` } `; +const stylesForAnimation: { [K in AnimationType]: string } = { + // Needed for safari + easeUpFromBottom: `position: fixed`, +}; + const animations: { [K in AnimationType]: string } = { easeUpFromBottom: `${appearFromBottomFrames} 1s ease 0s 1 forwards`, }; export const Animation = styled(PlainAnimation)` animation: ${props => animations[props.type]}; + ${props => stylesForAnimation[props.type]}; `; Animation.displayName = 'Animation'; -- cgit v1.2.3