From 274436b99a8b100c282a529328003d46c2640cec Mon Sep 17 00:00:00 2001 From: Ameer-5-5 Date: Thu, 23 Jul 2026 18:40:46 +0000 Subject: [PATCH 1/2] feat: card touch ripple --- app/styles/touch.css | 20 ++++++++++++++++++++ components/PredictionCard.tsx | 4 ++-- components/__tests__/PredictionCard.test.tsx | 6 ++++-- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/app/styles/touch.css b/app/styles/touch.css index b5e541d3..a8d9ca3e 100644 --- a/app/styles/touch.css +++ b/app/styles/touch.css @@ -41,4 +41,24 @@ min-height: 44px; min-width: 44px; } + + .touch-ripple { + position: relative; + overflow: hidden; + } + + .touch-ripple:active::after { + content: ""; + position: absolute; + inset: 0; + background: rgba(148, 163, 184, 0.18); + border-radius: inherit; + pointer-events: none; + animation: touch-ripple 220ms ease-out; + } + + @keyframes touch-ripple { + from { opacity: 1; transform: scale(0.96); } + to { opacity: 0; transform: scale(1); } + } } diff --git a/components/PredictionCard.tsx b/components/PredictionCard.tsx index 3c18b593..8b4ff332 100644 --- a/components/PredictionCard.tsx +++ b/components/PredictionCard.tsx @@ -105,7 +105,7 @@ const PredictionCard: React.FC = ({ prediction }) => { return ( /* touch-target: enforces ≥44px hit area (WCAG 2.5.5 / Apple HIG). */ -