💄 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.
main
welpo 3 months ago
parent 123110ea43
commit 4be8a5634f
No known key found for this signature in database
GPG Key ID: A2F978CF4EC1F5A6

@ -1,4 +1,5 @@
code { code {
-webkit-text-size-adjust: 100%;
border-radius: 5px; border-radius: 5px;
background-color: var(--bg-1); background-color: var(--bg-1);
padding-inline: 0.2em; padding-inline: 0.2em;
@ -31,7 +32,7 @@ code {
tbody td:first-child { tbody td:first-child {
opacity: 50%; opacity: 50%;
padding-inline-end: 0.8rem; padding-inline-end: 0.8rem;
width: 0rem; width: 1px; // Without this, iOS Safari centres short lines.
user-select: none; user-select: none;
text-align: end; text-align: end;
} }

Loading…
Cancel
Save