From 15a28bac15169437341ed290a2584cfcabb43578 Mon Sep 17 00:00:00 2001 From: Seth Falco Date: Sun, 2 Aug 2026 21:07:41 +0100 Subject: [PATCH] fix(a11y): size external link icon based on browser/OS font-size When the client is configured to use a different font-size than the default (i.e. on the OS or in browser settings) the external link icon became disproportionately sized relative to the text. This converts the hardcodes pixel values to rem. --- .../src/theme/Icon/ExternalLink/index.tsx | 4 ++-- .../src/theme/NavbarItem/NavbarNavLink.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/docusaurus-theme-classic/src/theme/Icon/ExternalLink/index.tsx b/packages/docusaurus-theme-classic/src/theme/Icon/ExternalLink/index.tsx index b899a1fee742..817f33224084 100644 --- a/packages/docusaurus-theme-classic/src/theme/Icon/ExternalLink/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Icon/ExternalLink/index.tsx @@ -16,8 +16,8 @@ import styles from './styles.module.css'; const svgSprite = '#theme-svg-external-link'; export default function IconExternalLink({ - width = 13.5, - height = 13.5, + width = '0.84375rem', + height = '0.84375rem', }: Props): ReactNode { return ( )}