Follow up for mobile responsiveness patch series

Aiden Woodruff aiden at aidenw.net
Sun Apr 5 02:25:17 UTC 2026


Hi Rito,

As a user of cgit, I like most of the current mobile experience. I do not see
what is wrong with the "panzooming dance". The current summary layout shows
everything at a glance, and then I zoom in where I want. However, the layout
does suffer when the main content (summary rows or code) overflows the width.
In those cases it is in my opinion a clear visibility improvement to scroll
horizontally.

In general, I do not think any content (especially controls like the search
bar) should be hidden from view. It might not be immediately clear that there
are elements off-screen.

To fix only the main content overflow issue, the following simpler, CSS-only
patch would suffice.  But it is worth mentioning that CSS can easily be
customized in any installation.

---
 cgit.css | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cgit.css b/cgit.css
index a37defe..118e75c 100644
--- a/cgit.css
+++ b/cgit.css
@@ -117,6 +117,9 @@ div#cgit div.content {
 	margin: 0px;
 	padding: 2em;
 	border-bottom: solid 3px #ccc;
+	overflow-x: auto;
+	max-width: 100%;
+	-webkit-overflow-scrolling: touch;
 }

-- 
Aiden Woodruff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 265 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20260404/67270c2a/attachment.sig>


More information about the CGit mailing list