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) <noreply@anthropic.com>
This commit is contained in:
parent
b5eb81e44f
commit
34ecbd570a
1 changed files with 1 additions and 1 deletions
|
|
@ -5,7 +5,7 @@ export { default as AvatarFallback } from './AvatarFallback.vue'
|
||||||
export { default as AvatarImage } from './AvatarImage.vue'
|
export { default as AvatarImage } from './AvatarImage.vue'
|
||||||
|
|
||||||
export const avatarVariant = cva(
|
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: {
|
variants: {
|
||||||
size: {
|
size: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue