hgweb: remove artificial width constraint from header in monoblue
authorAnton Shestakov <engored@ya.ru>
Thu, 21 May 2015 00:27:12 +0800
changeset 25230 af023b09ba52
parent 25229 451df92cec49
child 25231 8545bd381504
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.
mercurial/templates/static/style-monoblue.css
--- a/mercurial/templates/static/style-monoblue.css	Wed May 20 15:29:32 2015 -0500
+++ b/mercurial/templates/static/style-monoblue.css	Thu May 21 00:27:12 2015 +0800
@@ -53,10 +53,8 @@
   }
 
   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 @@
     margin: 10px 0 0 0;
     list-style-type: none;
     overflow: hidden;
-    width: 900px;
   }
     ul.page-nav li {
       margin: 0 2px 0 0;