From f36bf1437cff7e0f59db49f6e7590ebb4b004ad3 Mon Sep 17 00:00:00 2001 From: sagit <36596628+Sagit-chu@users.noreply.github.com> Date: Sun, 22 Feb 2026 13:28:47 +0800 Subject: [PATCH] fix(frontend): prevent font blurriness caused by scale animations (#183) Remove scale transforms from Framer Motion animations that cause subpixel rendering issues on text elements. Replace with opacity + translateY for smooth animations without blur. - Remove scale from FadeIn component (animated-page.tsx) - Remove scale from login page entrance animation (index.tsx) - Remove scale from search bar button animation (search-bar.tsx) - Remove whileTap scale from sidebar menu buttons (admin.tsx) - Remove scale from captcha modal animation (globals.css) - Add .gpu-accelerated utility class for future use Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus --- vite-frontend/src/components/animated-page.tsx | 5 +++-- vite-frontend/src/components/search-bar.tsx | 4 ++-- vite-frontend/src/layouts/admin.tsx | 1 - vite-frontend/src/pages/index.tsx | 4 ++-- vite-frontend/src/styles/globals.css | 12 ++++++++++-- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/vite-frontend/src/components/animated-page.tsx b/vite-frontend/src/components/animated-page.tsx index ed59695..5a49781 100644 --- a/vite-frontend/src/components/animated-page.tsx +++ b/vite-frontend/src/components/animated-page.tsx @@ -100,6 +100,7 @@ export const StaggerItem = ({ /** * Simple fade-in animation for standalone elements (chips, badges, counters, etc.) + * Uses opacity + translateY to avoid font blurriness caused by scale transforms. */ export const FadeIn = ({ children, @@ -111,9 +112,9 @@ export const FadeIn = ({ className?: string; }) => ( {children} diff --git a/vite-frontend/src/components/search-bar.tsx b/vite-frontend/src/components/search-bar.tsx index 6f68fff..478d855 100644 --- a/vite-frontend/src/components/search-bar.tsx +++ b/vite-frontend/src/components/search-bar.tsx @@ -29,8 +29,8 @@ export function SearchBar({