From 9f3df4899fbb736d77ae1ded8104d8a8b83594c6 Mon Sep 17 00:00:00 2001 From: Alberto Bertogli Date: Sat, 15 May 2021 01:04:19 +0100 Subject: [PATCH] css: Improve handling of text overflow in

When a 
 section (commit message, blob, diff) has a very long line,
today it makes the entire page very wide, causing usability issues.

This patch makes 
 have a horizontal scroll in those cases, which is
easier to use.
---
 static/git-arr.css | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/static/git-arr.css b/static/git-arr.css
index 2e4dcf8..e9533c7 100644
--- a/static/git-arr.css
+++ b/static/git-arr.css
@@ -147,6 +147,14 @@ div.toggable-title {
     margin-bottom: 0.3em;
 }
 
+pre {
+    /* Sometimes, 
 elements (commit messages, diffs, blobs) have very
+     * long lines. In those case, use automatic overflow, which will
+     * introduce a horizontal scroll bar for this element only (more
+     * comfortable than stretching the page, which is the default). */
+    overflow: auto;
+}
+
 
 /* Commit message and diff. */
 pre.commit-message {