From patchwork Tue Nov 29 09:37:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zygmunt Krynicki X-Patchwork-Id: 5341 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 96AA723E17 for ; Tue, 29 Nov 2011 09:37:21 +0000 (UTC) Received: from mail-lpp01m010-f52.google.com (mail-lpp01m010-f52.google.com [209.85.215.52]) by fiordland.canonical.com (Postfix) with ESMTP id 7BF9FA18066 for ; Tue, 29 Nov 2011 09:37:21 +0000 (UTC) Received: by mail-lpp01m010-f52.google.com with SMTP id h2so1233343laa.11 for ; Tue, 29 Nov 2011 01:37:21 -0800 (PST) Received: by 10.152.144.136 with SMTP id sm8mr31027258lab.33.1322559441138; Tue, 29 Nov 2011 01:37:21 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.41.198 with SMTP id h6cs32659lal; Tue, 29 Nov 2011 01:37:18 -0800 (PST) Received: by 10.227.205.197 with SMTP id fr5mr18891493wbb.3.1322559434499; Tue, 29 Nov 2011 01:37:14 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id fw15si6497513wbb.36.2011.11.29.01.37.14 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 29 Nov 2011 01:37:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1RVK7m-0007F8-2g for ; Tue, 29 Nov 2011 09:37:14 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 0BFACE0435 for ; Tue, 29 Nov 2011 09:37:14 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-server X-Launchpad-Branch: ~linaro-validation/lava-server/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 292 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-server/trunk] Rev 292: Fix top menu alignment/rendering. Message-Id: <20111129093714.13982.77984.launchpad@ackee.canonical.com> Date: Tue, 29 Nov 2011 09:37:14 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14399"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 370cada78e79ca7a646e9537ecbf77956c245183 ------------------------------------------------------------ revno: 292 committer: Zygmunt Krynicki branch nick: lava-server timestamp: Fri 2011-11-18 14:57:11 +0100 message: Fix top menu alignment/rendering. I tried a lot of things to make this work. Currently the main panel is a flex container, each item is wrapped in a div box that can optionally flex to fill the space (like the spacer between menu items and indicators). The actual text of the menu is rendered as a table-cell to get vertical-align to work sensibly. The innermost item is also sized with height: 80px to make the menu wide enough and look nice. My attempts to use min-height to avoid overflow failed as this does not seem to work with everything else. Testing done in Firefox 7 and Chromium 15 on Ubuntu, pending testing on other systems (where fonts will differ, among others) and mobile browsers. modified: lava_server/htdocs/css/default.css lava_server/templates/layouts/content.html --- lp:lava-server https://code.launchpad.net/~linaro-validation/lava-server/trunk You are subscribed to branch lp:lava-server. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-server/trunk/+edit-subscription === modified file 'lava_server/htdocs/css/default.css' --- lava_server/htdocs/css/default.css 2011-11-10 12:26:47 +0000 +++ lava_server/htdocs/css/default.css 2011-11-18 13:57:11 +0000 @@ -72,32 +72,29 @@ } #lava-panel .lava-panel-element { - display: block; - line-height: 18px; - min-height: 18px; - padding: 10px 1ex; +} + +#lava-panel .lava-panel-element .lava-panel-menu-text { + display: table-cell; + vertical-align: middle; + padding: 1ex; + height: 50px; +} + +#lava-panel .lava-panel-element:hover { + border-color: white; +} + +#lava-panel .lava-panel-element.lava-indicator { + box-pack: end; + -moz-box-pack: end; + -webkit-box-pack: end; } #lava-panel .lava-panel-element.has-menu { cursor: pointer; } -/* -#lava-panel .lava-panel-element:hover { - background-color: #444; - color: #000; -} - -#lava-panel a.lava-panel-element:hover { - color: #a1cd41; -} - -#lava-panel .lava-panel-element.no-hover:hover { - background-color: inherit; - color: inherit; -} -*/ - #lava-panel .lava-panel-element.active { background-image: linear-gradient(bottom, rgb(161,205,65) 0%, rgb(0,0,0) 20%); background-image: -o-linear-gradient(bottom, rgb(161,205,65) 0%, rgb(0,0,0) 20%); @@ -114,7 +111,6 @@ color: white; } - #lava-panel a { color: inherit; text-decoration: none; @@ -135,7 +131,7 @@ position: absolute; left: 0; - top: 35px; + top: 50px; background: black; border: 2px solid #a1cd41; @@ -177,6 +173,7 @@ #lava-user-indicator .sign-in-hint { font-size: 8pt; + color: #888; } /* AJAX indicator */ === modified file 'lava_server/templates/layouts/content.html' --- lava_server/templates/layouts/content.html 2011-11-18 11:24:38 +0000 +++ lava_server/templates/layouts/content.html 2011-11-18 13:57:11 +0000 @@ -18,7 +18,9 @@ {% block menu %} {% for menu in lava.menu_list %} - {{ menu.label }}{% if menu.sub_menu %} ▾{% endif %} + {% if menu.sub_menu %}
    {% for sub_menu in menu.sub_menu %} @@ -35,7 +37,9 @@
    - AJAX progress indicator +
    + AJAX progress indicator +