💄 style: fix numbered code blocks on iOS Safari

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.
This commit is contained in:
welpo
2024-11-24 01:07:35 +01:00
parent 123110ea43
commit 4be8a5634f

View File

@@ -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;
}