From 4be8a5634fa2990825e9bc785029c4dddb340c39 Mon Sep 17 00:00:00 2001 From: welpo Date: Sun, 24 Nov 2024 01:07:35 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20style:=20fix=20numbered=20code?= =?UTF-8?q?=20blocks=20on=20iOS=20Safari?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tables used for line numbers were inheriting incorrect font sizes on iOS Safari due to WebKit's text size adjustment behaviour. Short lines were being centred, too. --- sass/parts/_code.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sass/parts/_code.scss b/sass/parts/_code.scss index 9bc57d1bf..748adc936 100644 --- a/sass/parts/_code.scss +++ b/sass/parts/_code.scss @@ -1,4 +1,5 @@ code { + -webkit-text-size-adjust: 100%; border-radius: 5px; background-color: var(--bg-1); padding-inline: 0.2em; @@ -31,7 +32,7 @@ code { tbody td:first-child { opacity: 50%; padding-inline-end: 0.8rem; - width: 0rem; + width: 1px; // Without this, iOS Safari centres short lines. user-select: none; text-align: end; }