Patchwork hgweb: remove artificial width constraint from header in monoblue

login
register
mail settings
Submitter Anton Shestakov
Date May 20, 2015, 4:30 p.m.
Message ID <683919b79389a3060c10.1432139424@neuro>
Download mbox | patch
Permalink /patch/9194/
State Accepted
Headers show

Comments

Anton Shestakov - May 20, 2015, 4:30 p.m.
# HG changeset patch
# User Anton Shestakov <engored@ya.ru>
# Date 1432139232 -28800
#      Thu May 21 00:27:12 2015 +0800
# Node ID 683919b79389a3060c108297e74ff8eaf7b41e4f
# Parent  8b69b5fcfa4b7aff70b46a3859e2b1dc0b82a5ab
hgweb: remove artificial width constraint from header in monoblue

This width property comes from the beginning of the monoblue theme itself, and
was used to stop the action header ("summary", "shortlog", "changelog", etc)
from clashing with the search form. But it still was happening (on smaller
screens, and with more actions added to hgweb over time).

Effectively, the hardcoded width was preventing the header from fitting into
the available screen space, since it always tried to be 900px wide, even if
that meant horizontal scroll on smaller screens and having the actions on two
lines where one should've been enough. For example,
http://selenic.com/hg/log?style=monoblue has the last two actions ("gz" and
"help") in the header on the second line, even when there seems to be enough
space on the first.

This patch makes the form float, which prevents it from overlaying/clashing
with the action header, and allows the latter to resize itself in the best
possible way.
Matt Mackall - May 20, 2015, 9:43 p.m.
On Thu, 2015-05-21 at 00:30 +0800, Anton Shestakov wrote:
> # HG changeset patch
> # User Anton Shestakov <engored@ya.ru>
> # Date 1432139232 -28800
> #      Thu May 21 00:27:12 2015 +0800
> # Node ID 683919b79389a3060c108297e74ff8eaf7b41e4f
> # Parent  8b69b5fcfa4b7aff70b46a3859e2b1dc0b82a5ab
> hgweb: remove artificial width constraint from header in monoblue

Queued for default, thanks.

Patch

diff --git a/mercurial/templates/static/style-monoblue.css b/mercurial/templates/static/style-monoblue.css
--- a/mercurial/templates/static/style-monoblue.css
+++ b/mercurial/templates/static/style-monoblue.css
@@ -53,10 +53,8 @@  div.page-header {
   }
 
   div.page-header form {
-    position: absolute;
-    margin-bottom: 2px;
-    bottom: 0;
-    right: 20px;
+    float: right;
+    margin-top: -2px;
   }
   div.page-header form label {
     color: #DDD;
@@ -83,7 +81,6 @@  div.page-header {
     margin: 10px 0 0 0;
     list-style-type: none;
     overflow: hidden;
-    width: 900px;
   }
     ul.page-nav li {
       margin: 0 2px 0 0;