From 20ad4b8b10df6398eca150449d8e304989a7f31f Mon Sep 17 00:00:00 2001 From: Christian Georgi Date: Tue, 21 Jul 2026 15:10:12 +0200 Subject: [PATCH] Fix external link icon for Safari --- .vitepress/theme/styles.scss | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.vitepress/theme/styles.scss b/.vitepress/theme/styles.scss index 53d60534e..109b207e0 100644 --- a/.vitepress/theme/styles.scss +++ b/.vitepress/theme/styles.scss @@ -358,6 +358,22 @@ img, video.bright { white-space: nowrap; } +// Safari may render the invisible Unicode marker used by VitePress as tofu blocks. +// Apply this workaround only to Safari-capable engines. +@supports (font: -apple-system-body) and (-webkit-appearance: none) { + .vp-external-link-icon::after, + .external-link-icon-enabled :is(.vp-doc a[href*='://'], .vp-doc a[target='_blank']):not(:is(.no-icon, svg a, :has(img, svg)))::after { + content: ''; + display: inline-block; + width: 11px; + height: 11px; + padding-left: 0; + margin-left: 4px; + line-height: 1; + vertical-align: text-top; + } +} +