From a4be8e709cb6be9855ff4728b59eb64f808500af Mon Sep 17 00:00:00 2001 From: Simon Lehericey Date: Wed, 25 Oct 2017 13:59:02 +0200 Subject: [PATCH] [fix #872] Procedure Logo: fix overflow logo for ie11 Bug in ie11 linked to flex and image ratio The only way to fix it so far and preserving image ratio is to use background image property --- app/assets/stylesheets/new_design/procedure_list.scss | 4 ++++ app/views/new_gestionnaire/procedures/index.html.haml | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/new_design/procedure_list.scss b/app/assets/stylesheets/new_design/procedure_list.scss index b73ec8929..a4fe579f2 100644 --- a/app/assets/stylesheets/new_design/procedure_list.scss +++ b/app/assets/stylesheets/new_design/procedure_list.scss @@ -30,6 +30,10 @@ width: 93px; margin-right: 3 * $default-spacer; flex-shrink: 0; + background-image: url("your/url/here"); + background-size: contain; + background-repeat: no-repeat; + background-position: 95% 50%; } .procedure-title { diff --git a/app/views/new_gestionnaire/procedures/index.html.haml b/app/views/new_gestionnaire/procedures/index.html.haml index 875c375e5..d9f95ad54 100644 --- a/app/views/new_gestionnaire/procedures/index.html.haml +++ b/app/views/new_gestionnaire/procedures/index.html.haml @@ -7,9 +7,7 @@ = link_to(procedure_path(p)) do .flex - .procedure-logo - - if p.logo.present? - = image_tag p.logo, alt: "Logo de la procédure" + .procedure-logo{ style: p.logo.present? ? "background-image: url(#{p.logo.url})" : nil } .procedure-details %p.procedure-title