Improve video card hover effect for smoother transitions
Adjusted the `VideoCard` component by removing the `-translate-y-4` class from the hover effect and adding `transformStyle: 'preserve-3d'` to the style attribute. This aims to fix an issue where the card might jump or not scale correctly during hover interactions, providing a more visually consistent experience. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 2eb1084e-b728-4449-9231-f1665924c8d5 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/2eb1084e-b728-4449-9231-f1665924c8d5/P3O2FU7
This commit is contained in:
parent
1bc6717c37
commit
cf9de359bd
@ -159,7 +159,8 @@ export default function VideoCard({ video, onClick, className = "" }: VideoCardP
|
||||
return (
|
||||
<div
|
||||
data-testid={`card-video-${video.id}`}
|
||||
className={`video-card transition-all duration-300 hover:scale-125 hover:z-50 hover:-translate-y-4 p-1 md:p-2 ${className}`}
|
||||
className={`video-card transition-all duration-300 hover:scale-125 hover:z-50 p-1 md:p-2 ${className}`}
|
||||
style={{ transformStyle: 'preserve-3d' }}
|
||||
onMouseEnter={() => setIsHovered(true)}
|
||||
onMouseLeave={() => setIsHovered(false)}
|
||||
>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user