public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rito Rhymes via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Rito <rito@ritovision.com>, Rito Rhymes <rito@ritovision.com>
Subject: [PATCH 3/5] gitweb: fix mobile page overflow across log/commit/blob/diff views
Date: Mon, 09 Feb 2026 23:17:16 +0000	[thread overview]
Message-ID: <7b785b6064966aefe6883ce3c45e80bb74fe79f4.1770679038.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.2043.git.1770679038.gitgitgadget@gmail.com>

From: Rito Rhymes <rito@ritovision.com>

On mobile-sized viewports, gitweb pages in log/commit/blob/diff views can
overflow horizontally due to desktop-oriented paddings and fixed-width
preformatted content.

Add a shared mobile media query to rebalance those layouts: reduce or clear
paddings in log/commit sections, keep header/search content within the
viewport, and allow horizontal scrolling for preformatted blob/diff content
instead of forcing page-wide overflow.

Signed-off-by: Rito Rhymes <rito@ritovision.com>
---
 gitweb/static/gitweb.css | 71 ++++++++++++++++++++++++++++++++++++----
 1 file changed, 64 insertions(+), 7 deletions(-)

diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css
index 1fe120cd95..135590b64c 100644
--- a/gitweb/static/gitweb.css
+++ b/gitweb/static/gitweb.css
@@ -123,6 +123,7 @@ div.title_text {
 
 div.log_body {
 	padding: 8px 8px 8px 150px;
+	overflow-wrap: anywhere;
 }
 
 span.age {
@@ -537,13 +538,6 @@ div.search {
 div.projsearch {
 	text-align: center;
 	margin: 20px 0px;
-	padding: 0 8px;
-	box-sizing: border-box;
-}
-
-div.projsearch input[type="text"] {
-	max-width: 100%;
-	box-sizing: border-box;
 }
 
 div.projsearch form {
@@ -691,3 +685,66 @@ div.remote {
 .kwb    { color:#830000; }
 .kwc    { color:#000000; font-weight:bold; }
 .kwd    { color:#010181; }
+
+@media (max-width: 768px) {
+	div.page_body {
+		overflow-x: auto;
+		-webkit-overflow-scrolling: touch;
+	}
+
+	div.page_body div.pre {
+		min-width: max-content;
+	}
+
+	div.projsearch {
+		padding: 0 8px;
+		box-sizing: border-box;
+	}
+
+	div.projsearch input[type="text"] {
+		max-width: 100%;
+		box-sizing: border-box;
+	}
+
+	div.title_text {
+		overflow-x: auto;
+		-webkit-overflow-scrolling: touch;
+		padding-left: 4px;
+		padding-right: 4px;
+		box-sizing: border-box;
+	}
+
+	div.title_text table.object_header {
+		width: max-content;
+	}
+
+	div.log_body {
+		padding: 8px;
+		clear: left;
+	}
+
+	div.patchset div.patch {
+		width: max-content;
+		min-width: 100%;
+	}
+
+	div.diff.header {
+		padding: 4px 8px 2px 8px;
+		white-space: nowrap;
+		overflow-wrap: normal;
+	}
+
+	div.diff.extended_header {
+		padding: 2px 8px;
+		white-space: nowrap;
+		overflow-wrap: normal;
+	}
+
+	div.diff.ctx,
+	div.diff.add,
+	div.diff.rem,
+	div.diff.chunk_header {
+		padding: 0 8px;
+		white-space: pre;
+	}
+}
-- 
gitgitgadget


  parent reply	other threads:[~2026-02-09 23:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-09 23:17 [PATCH 0/5] gitweb: fix broken mobile layouts across views Rito via GitGitGadget
2026-02-09 23:17 ` [PATCH 1/5] gitweb: add viewport meta tag for mobile devices Rito Rhymes via GitGitGadget
2026-02-09 23:17 ` [PATCH 2/5] gitweb: prevent project search bar from overflowing on mobile Rito Rhymes via GitGitGadget
2026-02-09 23:17 ` Rito Rhymes via GitGitGadget [this message]
2026-02-15 23:20   ` [PATCH 3/5] gitweb: fix mobile page overflow across log/commit/blob/diff views Eric Sunshine
2026-02-17 12:29     ` Matthew Pellerito
2026-02-09 23:17 ` [PATCH 4/5] gitweb: fix mobile footer overflow by wrapping text and clearing floats Rito Rhymes via GitGitGadget
2026-02-09 23:17 ` [PATCH 5/5] gitweb: let page header grow on mobile for long wrapped project names Rito Rhymes via GitGitGadget
2026-02-16 15:53 ` [PATCH v2 0/5] gitweb: fix broken mobile layouts across views Rito via GitGitGadget
2026-02-16 15:53   ` [PATCH v2 1/5] gitweb: add viewport meta tag for mobile devices Rito Rhymes via GitGitGadget
2026-02-16 15:53   ` [PATCH v2 2/5] gitweb: prevent project search bar from overflowing on mobile Rito Rhymes via GitGitGadget
2026-02-16 15:53   ` [PATCH v2 3/5] gitweb: fix mobile page overflow across log/commit/blob/diff views Rito Rhymes via GitGitGadget
2026-02-16 15:53   ` [PATCH v2 4/5] gitweb: fix mobile footer overflow by wrapping text and clearing floats Rito Rhymes via GitGitGadget
2026-02-16 15:53   ` [PATCH v2 5/5] gitweb: let page header grow on mobile for long wrapped project names Rito Rhymes via GitGitGadget
2026-02-20 22:38   ` [PATCH v2 0/5] gitweb: fix broken mobile layouts across views Junio C Hamano
2026-02-21  0:17     ` Rito Rhymes
2026-02-22  8:39     ` Eric Sunshine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7b785b6064966aefe6883ce3c45e80bb74fe79f4.1770679038.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=rito@ritovision.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox