From e8505cef75aa9ab7e05974af8022bc66f639ea1d Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 15 May 2022 11:17:08 +0200 Subject: [PATCH] Do not wrap code boxes on mobile Having long lines wrap multiple times is horrible, overflow scrolling is much better and also quite natural on touch devices. --- wcfsetup/install/files/style/bbcode/code.scss | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/style/bbcode/code.scss b/wcfsetup/install/files/style/bbcode/code.scss index 0b632efc39..4cee52faaa 100644 --- a/wcfsetup/install/files/style/bbcode/code.scss +++ b/wcfsetup/install/files/style/bbcode/code.scss @@ -147,13 +147,17 @@ } > span { - white-space: pre-wrap; - word-break: break-all; + white-space: pre; /* Prevent empty lines from collapsing. */ &:empty { display: inline-block; } + + @include screen-md-up { + white-space: pre-wrap; + word-break: break-all; + } } &:target { -- 2.20.1