Do not wrap code boxes on mobile
authorAlexander Ebert <ebert@woltlab.com>
Sun, 15 May 2022 09:17:08 +0000 (11:17 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 15 May 2022 09:17:08 +0000 (11:17 +0200)
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

index 0b632efc39e0f9b526dfa8159daa09cab5095a3d..4cee52faaa202d539c46b408ab2553872aca5c60 100644 (file)
                                }
 
                                > 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 {