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:
@@ -101,15 +101,17 @@ const ExternalLinkFavicon: React.FC<{ href: string }> = ({ href }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<img
|
<span className="mr-1 inline-flex size-[18px] items-center justify-center rounded border border-[var(--border)] bg-[var(--interactive-hover)] align-[-0.25em]">
|
||||||
src={faviconUrl}
|
<img
|
||||||
alt=""
|
src={faviconUrl}
|
||||||
aria-hidden="true"
|
alt=""
|
||||||
loading="lazy"
|
aria-hidden="true"
|
||||||
decoding="async"
|
loading="lazy"
|
||||||
className="mr-1 inline-block size-4 rounded-sm align-[-0.1875em]"
|
decoding="async"
|
||||||
onError={() => setFailed(true)}
|
className="size-3.5 rounded-sm"
|
||||||
/>
|
onError={() => setFailed(true)}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -51,15 +51,17 @@ const ExternalLinkFavicon: React.FC<{ href: string }> = ({ href }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<img
|
<span className="inline-flex size-[18px] flex-shrink-0 items-center justify-center rounded border border-[var(--border)] bg-[var(--interactive-hover)]">
|
||||||
src={faviconUrl}
|
<img
|
||||||
alt=""
|
src={faviconUrl}
|
||||||
aria-hidden="true"
|
alt=""
|
||||||
loading="lazy"
|
aria-hidden="true"
|
||||||
decoding="async"
|
loading="lazy"
|
||||||
className="size-4 flex-shrink-0 rounded-sm"
|
decoding="async"
|
||||||
onError={() => setFailed(true)}
|
className="size-3.5 rounded-sm"
|
||||||
/>
|
onError={() => setFailed(true)}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user