From 4f7a5dcd886e821f4f336ac283906503606de847 Mon Sep 17 00:00:00 2001 From: Padreug Date: Sun, 7 Jun 2026 15:25:08 +0200 Subject: [PATCH] fix(avatar): pair bg-secondary with text-secondary-foreground The Avatar primitive paired bg-secondary with text-foreground, which isn't a Shadcn-designed pair. In themes whose secondary is a bright color (Starry Night dark: bright yellow) the global foreground (near-white) lands on top and the initial becomes unreadable. Switch to text-secondary-foreground so contrast is whatever the theme author guaranteed for that pair. Pre-emptively protects any future theme since every theme must keep secondary/secondary-foreground contrast valid. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/components/ui/avatar/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ui/avatar/index.ts b/src/components/ui/avatar/index.ts index 5367952..0cc8926 100644 --- a/src/components/ui/avatar/index.ts +++ b/src/components/ui/avatar/index.ts @@ -5,7 +5,7 @@ export { default as AvatarFallback } from './AvatarFallback.vue' export { default as AvatarImage } from './AvatarImage.vue' export const avatarVariant = cva( - 'inline-flex items-center justify-center font-normal text-foreground select-none shrink-0 bg-secondary overflow-hidden', + 'inline-flex items-center justify-center font-normal text-secondary-foreground select-none shrink-0 bg-secondary overflow-hidden', { variants: { size: {