Skip to content

Commit

Permalink
[frogcrypto] fix bounce frog letters (proofcarryingdata#1217)
Browse files Browse the repository at this point in the history
fix bouncy frog letters in safari

<img width="405" alt="image"
src="https://github.com/proofcarryingdata/zupass/assets/4317392/2309a839-b703-47d7-ad42-8dfeb343d30c">

Co-authored-by: Forest Fang <[email protected]>
Co-authored-by: Richard Liu <[email protected]>
  • Loading branch information
3 people authored Nov 11, 2023
1 parent c7d6a86 commit e6d48ec
Showing 1 changed file with 7 additions and 30 deletions.
37 changes: 7 additions & 30 deletions apps/passport-client/components/screens/FrogScreens/FrogFolder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { FrogCryptoFolderName } from "@pcd/passport-interface";
import _ from "lodash";
import prettyMilliseconds from "pretty-ms";
import { useEffect, useMemo, useState } from "react";
import styled from "styled-components";
import styled, { keyframes } from "styled-components";
import { useSubscriptions } from "../../../src/appHooks";
import {
DEFAULT_FROG_SUBSCRIPTION_PROVIDER_URL,
Expand Down Expand Up @@ -160,11 +160,8 @@ export const SuperFunkyFont = styled.div`
}
`;

const BounceText = styled.span<{ delay: number }>`
animation: bounce 5s infinite ${(p) => p.delay}s;
@keyframes bounce {
0% {
const bounceKeyframes = keyframes`
0% {
transform: scale(1, 1) translateY(0);
}
2% {
Expand All @@ -185,29 +182,9 @@ const BounceText = styled.span<{ delay: number }>`
100% {
transform: scale(1, 1) translateY(0);
}
}
`;

@-webkit-keyframes bounce {
0% {
transform: scale(1, 1) translateY(0);
}
2% {
transform: scale(1.1, 0.9) translateY(0);
}
5% {
transform: scale(0.9, 1.1) translateY(-10px);
}
10% {
transform: scale(1.05, 0.95) translateY(0);
}
12% {
transform: scale(1, 1) translateY(-2px);
}
15% {
transform: scale(1, 1) translateY(0);
}
100% {
transform: scale(1, 1) translateY(0);
}
}
const BounceText = styled.span<{ delay: number }>`
animation: ${bounceKeyframes} 5s infinite ${(p) => p.delay}s;
-webkit-animation: ${bounceKeyframes} 5s infinite ${(p) => p.delay}s;
`;

0 comments on commit e6d48ec

Please sign in to comment.