From 39981f8075479fb4905ee9d504d4e8b849b8d37f Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 20 Oct 2025 23:12:08 +0800 Subject: [PATCH] fix: eliminate layout shift when switching providers - Use opacity transition instead of conditional rendering for "current" badge to prevent height changes - Add min-h-[20px] to title row to maintain consistent height - Use 2px border for active provider, 1px for inactive to improve visual distinction - Remove global border-color rule that was overriding Tailwind utilities - Use HSL arbitrary values for border colors to work with Tailwind 4 + shadcn/ui --- src/components/providers/ProviderCard.tsx | 23 +++++++++++++---------- src/index.css | 1 - 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/components/providers/ProviderCard.tsx b/src/components/providers/ProviderCard.tsx index a457742..7d9fb64 100644 --- a/src/components/providers/ProviderCard.tsx +++ b/src/components/providers/ProviderCard.tsx @@ -90,12 +90,12 @@ export function ProviderCard({ return (
@@ -117,15 +117,18 @@ export function ProviderCard({
-
+

{provider.name}

- {isCurrent && ( - - {t("provider.currentlyUsing")} - - )} + + {t("provider.currentlyUsing")} +
{displayUrl && ( diff --git a/src/index.css b/src/index.css index b2a55c1..72e555f 100644 --- a/src/index.css +++ b/src/index.css @@ -73,7 +73,6 @@ /* 全局基础样式 */ * { box-sizing: border-box; - border-color: hsl(var(--border)); } html {