Skip to content

Commit ab43baa

Browse files
committed
fix: animation timing and mobile pausing
1 parent 9f614e5 commit ab43baa

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/components/Homepage/ValuesMarquee.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import EthGlyphSolid from "@/components/icons/eth-glyph-solid.svg"
66
import Tooltip from "@/components/Tooltip"
77

88
import { cn } from "@/lib/utils/cn"
9+
import { isMobile } from "@/lib/utils/isMobile"
910

1011
import { type Pairing, useValuesMarquee } from "../Homepage/useValuesMarquee"
1112
import { Stack } from "../ui/flex"
@@ -109,7 +110,10 @@ const Row = forwardRef<HTMLDivElement, RowProps>(
109110
<div
110111
key={idx}
111112
className={cn(
112-
"group-hover:animate-pause flex min-w-fit items-center space-x-10 p-6 motion-reduce:w-full motion-reduce:animate-none motion-reduce:justify-center",
113+
"flex min-w-fit items-center space-x-10 p-6 motion-reduce:w-full motion-reduce:animate-none motion-reduce:justify-center",
114+
isMobile()
115+
? "group-has-[button:hover]:animate-pause"
116+
: "group-hover:animate-pause",
113117
toRight ? "animate-scroll-right" : "animate-scroll-left"
114118
)}
115119
>

tailwind.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@ const config = {
295295
animation: {
296296
"accordion-down": "accordion-down 0.2s ease-out",
297297
"accordion-up": "accordion-up 0.2s ease-out",
298-
"scroll-left": "scroll-left 15s linear infinite",
299-
"scroll-right": "scroll-right 15s linear infinite",
298+
"scroll-left": "scroll-left 25s linear infinite",
299+
"scroll-right": "scroll-right 25s linear infinite",
300300
},
301301
// Add custom border-radius tailwinds extension for "4xl" as "2rem"
302302
borderRadius: {

0 commit comments

Comments
 (0)