summaryrefslogtreecommitdiffstats
path: root/gitweb/static/gitweb.css
diff options
context:
space:
mode:
authorRito Rhymes <rito@ritovision.com>2026-02-16 15:53:29 +0000
committerJunio C Hamano <gitster@pobox.com>2026-02-17 11:49:12 -0800
commitfd10720357f01baa8a07ff6fa8e22de198424fd3 (patch)
treeeefcfb3d72dc988f87010c147817cba45e5922e4 /gitweb/static/gitweb.css
parent5be380d865972652a2cfd3f1f8d090c87489d904 (diff)
downloadgit-fd10720357f01baa8a07ff6fa8e22de198424fd3.tar.gz
git-fd10720357f01baa8a07ff6fa8e22de198424fd3.zip
gitweb: fix mobile page overflow across log/commit/blob/diff views
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb/static/gitweb.css')
-rw-r--r--gitweb/static/gitweb.css52
1 files changed, 52 insertions, 0 deletions
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;
+ }
}