Re: [PATCH 3/5] gitweb: fix mobile page overflow across log/commit/blob/diff views
From: Matthew Pellerito <hidden>
Date: 2026-02-17 12:29:22
Good catch. I just rerolled a cleaner sequencing.
From: Eric Sunshine <redacted>
To: "Rito Rhymes via GitGitGadget"<redacted>
Cc: <redacted>, "Rito Rhymes"<redacted>
Date: Sun, 15 Feb 2026 18:20:56 -0500
Subject: Re: [PATCH 3/5] gitweb: fix mobile page overflow across log/commit/blob/diff views
> On Mon, Feb 9, 2026 at 6:17 PM Rito Rhymes via GitGitGadget
> [off-list ref] wrote:
> > 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 [off-list ref]
> > ---
> > diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css
> > @@ -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;
> > }
>
> These lines were all added by patch [2/5], applying to all viewport
> sizes, but here in patch [3/5]...
>
> > @@ -691,3 +685,66 @@ div.remote {
> > +@media (max-width: 768px) {
> > + div.projsearch {
> > + padding: 0 8px;
> > + box-sizing: border-box;
> > + }
> > +
> > + div.projsearch input[type="text"] {
> > + max-width: 100%;
> > + box-sizing: border-box;
> > + }
>
> ...they are relocated to this @media query. It seems a bit odd to add
> the lines in one patch and then immediately relocate them in the next
> patch, and it's not clear why the series is constructed this way. I
> could, perhaps, understand having separate patches like this if the
> idea is to specially call out the existing "broken" behavior, but
> considering that the commit message of both patches talk about
> restricting the width of the input field to fit the viewport, I'm
> having trouble understanding why the patches are separate.
>
>