From 3ac160aa09ef63df5fe1d057aeb3a9c9e2610e77 Mon Sep 17 00:00:00 2001 From: stefanorigano Date: Thu, 11 May 2017 14:49:49 +0200 Subject: [PATCH] [IMP] website: company logo sizing Rather than use a fixed height, make the logo fill the navbar height. --- .../static/src/less/website.wrapwrap.less | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/addons/website/static/src/less/website.wrapwrap.less b/addons/website/static/src/less/website.wrapwrap.less index 3a774f8b434..141b08e4fbd 100644 --- a/addons/website/static/src/less/website.wrapwrap.less +++ b/addons/website/static/src/less/website.wrapwrap.less @@ -3,6 +3,12 @@ /// snippets-specific rules. /// +// Resize and vertically align navbar’s items relative to @navbar-height +.o-w-fill-navbar(@ratio: 0.8) { + height: round(@navbar-height * @ratio); + margin-top: round(@navbar-height * (1 - @ratio) / 2); +} + #wrapwrap { position: relative; display: table; @@ -22,10 +28,10 @@ header a.navbar-brand { &.logo { padding: 0 15px; - } - img { - max-height: 35px; - margin-top: 8px; + + img { + .o-w-fill-navbar(); + } } } footer { @@ -174,9 +180,8 @@ hr { .navbar.navbar-static-top { margin-bottom: 0; ul.nav > li.divider { - margin-top: 15px; - padding-top: 20px; - border-right: 1px solid grey; + .o-w-fill-navbar(); + border-right: 1px solid @navbar-default-link-disabled-color; } } ul.nav-stacked > li > a {