From 82f7c2ccc94d4ff8b1044d7acce022dbee5220c0 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Tue, 16 Jul 2024 05:50:30 -0700 Subject: [PATCH] Add overflow scroll bar to code blocks This solves a problem with smaller screens where the code would wrap to the next line which ruins the formatting of the code on smaller devices. A downside to this is that it makes it not fit on the screen but since it technically did not fit on the screen before and this way line breaks are not added this seems a much better way. It also will mean we shouldn't need to try and fix all the other long lines in code blocks (which not only can be problematic but in some cases it can be wrong - plus it is taking too much time away from moving from entry to the next entry to the next entry). --- ioccc.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ioccc.css b/ioccc.css index 842a2f785..8bdcbde20 100644 --- a/ioccc.css +++ b/ioccc.css @@ -410,9 +410,8 @@ body { pre, code { margin: 1em 0; hyphens: manual; - overflow-wrap: normal; - overflow: visible; - white-space: pre-wrap; + overflow-x: scroll; + overflow-y: scroll; color: DarkGreen; } @@ -721,6 +720,7 @@ transition: all .3s ease; padding-top: 0; padding-bottom: 0; color: DarkGreen; + overflow-x: scroll; } /* content text */