git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 3/5] gitweb: fix mobile page overflow across log/commit/blob/diff views

From
Rito Rhymes via GitGitGadget <gitgitgadget@gmail.com>
Date
Feb 16, 2026, 15:53 UTC
Message-ID
<0ebad7bbc39e68a712c25372e51141b302b9e7b0.1771257211.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.2043.v2.git.1771257211.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.

Extend the existing mobile media query to rebalance those layouts: reduce or clear paddings in log/commit sections, and allow horizontal scrolling for preformatted blob/diff content instead of forcing page-wide overflow.

All layout adjustments in this patch are mobile-scoped, except one global safeguard: set overflow-wrap:anywhere on div.log_body. Log content can contain escaped or non-breaking text that behaves like a single long token and can overflow at any viewport width, including desktop.

Signed-off-by: Rito Rhymes <rito@ritovision.com>
---
 gitweb/static/gitweb.css | 52 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)
diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css
index 0b63acc0e2..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 {
@@ -686,6 +687,15 @@ div.remote {
 .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;
@@ -695,4 +705,46 @@ div.remote {
 		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
Previous: Rito Rhymes via GitGitGadgetNext: Rito Rhymes via GitGitGadget
Message 12 of 17 in “gitweb: fix broken mobile layouts across views”
  1. 0/5 gitweb: fix broken mobile layouts across viewsRito via GitGitGadget, Feb 9, 2026
  2. 1/5 gitweb: add viewport meta tag for mobile devicesRito Rhymes via GitGitGadget, Feb 9, 2026
  3. 2/5 gitweb: prevent project search bar from overflowing on mobileRito Rhymes via GitGitGadget, Feb 9, 2026
  4. 3/5 gitweb: fix mobile page overflow across log/commit/blob/diff viewsRito Rhymes via GitGitGadget, Feb 9, 2026
  5. Eric SunshineFeb 15, 2026
  6. Matthew PelleritoFeb 17, 2026
  7. 4/5 gitweb: fix mobile footer overflow by wrapping text and clearing floatsRito Rhymes via GitGitGadget, Feb 9, 2026
  8. 5/5 gitweb: let page header grow on mobile for long wrapped project namesRito Rhymes via GitGitGadget, Feb 9, 2026
  9. 0/5 gitweb: fix broken mobile layouts across viewsRito via GitGitGadget, Feb 16, 2026
  10. 1/5 gitweb: add viewport meta tag for mobile devicesRito Rhymes via GitGitGadget, Feb 16, 2026
  11. 2/5 gitweb: prevent project search bar from overflowing on mobileRito Rhymes via GitGitGadget, Feb 16, 2026
  12. 3/5 gitweb: fix mobile page overflow across log/commit/blob/diff viewsRito Rhymes via GitGitGadget, Feb 16, 2026
  13. 4/5 gitweb: fix mobile footer overflow by wrapping text and clearing floatsRito Rhymes via GitGitGadget, Feb 16, 2026
  14. 5/5 gitweb: let page header grow on mobile for long wrapped project namesRito Rhymes via GitGitGadget, Feb 16, 2026
  15. Junio C HamanoFeb 20, 2026
  16. Rito RhymesFeb 21, 2026
  17. Eric SunshineFeb 22, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.