From 14a14c7403f4818751109ca863eeff9ef3ffec9f Mon Sep 17 00:00:00 2001 From: "Sean (Pixel 4a 5G, Termux)" Date: Mon, 21 Oct 2024 20:00:44 -0700 Subject: [PATCH] use css var for positioning --- src/components/onboarding/Leaderboard/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/onboarding/Leaderboard/index.tsx b/src/components/onboarding/Leaderboard/index.tsx index ba9c6bd8..0904f90d 100644 --- a/src/components/onboarding/Leaderboard/index.tsx +++ b/src/components/onboarding/Leaderboard/index.tsx @@ -90,7 +90,7 @@ const Leaderboard = ({ user }: LeaderboardProps) => { even={name !== userName} className={styles.row} style={{ - transform: `translateY(${position * 4}rem)`, + transform: `translateY(calc(${position} * var(--leaderboard-height)))`, zIndex: name === userName ? '5' : undefined, }} />