From e437cba1558835effdc2e3c5899eb6b64139a6a8 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 16 Jun 2017 16:49:43 +1000 Subject: [PATCH] Make style flexible for all sizes of logos Trying to support logos that are big. But logos that are too small should not be stretched either, better small than ugly. Remove static size declaration from HTML template since it doesn't reflect the logo size. Unfortunately, there are other CSS files that are in conflict. The file mail/email.css.scss defines this globally: img { max-width: 100%; } --- app/assets/stylesheets/darkswarm/menu.css.scss | 4 +++- app/views/shared/menu/_large_menu.html.haml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/darkswarm/menu.css.scss b/app/assets/stylesheets/darkswarm/menu.css.scss index 4eb3838bdf..e526ff50a2 100644 --- a/app/assets/stylesheets/darkswarm/menu.css.scss +++ b/app/assets/stylesheets/darkswarm/menu.css.scss @@ -118,8 +118,10 @@ nav { } .top-bar .ofn-logo img { - height: 51px; + height: auto; width: auto; + max-height: 51px; + max-width: 250px; } .left-off-canvas-menu { diff --git a/app/views/shared/menu/_large_menu.html.haml b/app/views/shared/menu/_large_menu.html.haml index 6a5be15a67..bf8e08c84f 100644 --- a/app/views/shared/menu/_large_menu.html.haml +++ b/app/views/shared/menu/_large_menu.html.haml @@ -3,7 +3,7 @@ %ul.left %li.ofn-logo %a{href: root_path} - %img{src: ContentConfig.logo.url, width: "250", height: "51"} + %img{src: ContentConfig.logo.url} %ul.center %li %a{href: main_app.shops_path}