From 1b406e70d323afebfe9863c9e229697eb9e21ae8 Mon Sep 17 00:00:00 2001 From: Jonas Tobias Hopusch Date: Mon, 27 Sep 2021 10:29:20 +0200 Subject: [PATCH] Horizontally scroll tables and codeblocks instead of entire page --- static/css/general.css | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/static/css/general.css b/static/css/general.css index b4e2d34..49ea96f 100644 --- a/static/css/general.css +++ b/static/css/general.css @@ -54,7 +54,10 @@ pre { margin-bottom: 1.5rem; margin-left: auto; margin-right: auto; + width: 100%; max-width: max-content; + overflow-y: auto; + line-break: strict; } /* Inline keywords/code */ @@ -93,28 +96,24 @@ hr { } table { - border-style: solid; - border-color: black; - border-right: none; - border-bottom: none; + display: block; border-collapse: collapse; margin: 1rem auto; + width: fit-content; max-width: 100%; + overflow-y: auto; } td, th { border-style: solid; border-color: black; - border-left: none; - border-top: none; border-collapse: collapse; padding: 0.5rem; - line-break: anywhere; } -@media (max-width: 15rem) { +@media (max-width: 20rem), (max-width: 300px) { * { - line-break: anywhere; + word-wrap: break-word; } }