fix: improve favicon contrast in chat links

Adds a compact themed badge behind link favicons
Prevents favicon badge borders from clipping
Keeps external link icons readable across themes
This commit is contained in:
Bohdan Triapitsyn
2026-05-19 14:01:41 +03:00
parent 25b328dcb8
commit e0a194eed0
2 changed files with 22 additions and 18 deletions
@@ -101,15 +101,17 @@ const ExternalLinkFavicon: React.FC<{ href: string }> = ({ href }) => {
} }
return ( return (
<span className="mr-1 inline-flex size-[18px] items-center justify-center rounded border border-[var(--border)] bg-[var(--interactive-hover)] align-[-0.25em]">
<img <img
src={faviconUrl} src={faviconUrl}
alt="" alt=""
aria-hidden="true" aria-hidden="true"
loading="lazy" loading="lazy"
decoding="async" decoding="async"
className="mr-1 inline-block size-4 rounded-sm align-[-0.1875em]" className="size-3.5 rounded-sm"
onError={() => setFailed(true)} onError={() => setFailed(true)}
/> />
</span>
); );
}; };
@@ -51,15 +51,17 @@ const ExternalLinkFavicon: React.FC<{ href: string }> = ({ href }) => {
} }
return ( return (
<span className="inline-flex size-[18px] flex-shrink-0 items-center justify-center rounded border border-[var(--border)] bg-[var(--interactive-hover)]">
<img <img
src={faviconUrl} src={faviconUrl}
alt="" alt=""
aria-hidden="true" aria-hidden="true"
loading="lazy" loading="lazy"
decoding="async" decoding="async"
className="size-4 flex-shrink-0 rounded-sm" className="size-3.5 rounded-sm"
onError={() => setFailed(true)} onError={() => setFailed(true)}
/> />
</span>
); );
}; };