From 594eb3783626b67bb56d6b0439546d8fe31fa0b8 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Tue, 18 Aug 2020 09:57:03 +0100 Subject: [PATCH] Make SVG alert icon show in Internet Explorer 10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit IE 10 supports using SVG[1] but has some buggy behaviour when they’re used as background images. Without an explicit width/height it stretches the viewBox of the SVG to fill the containing element. This causes the content of the file to display centered within the viewBox. Explicitly setting the width and height seems to be the thing that fixes this. Out of the suggested fixes on Stackoverflow[2] this one seems to be the most straightforward. 1. https://caniuse.com/#feat=svg 2. https://stackoverflow.com/questions/17944354/svg-background-image-position-is-always-centered-in-internet-explorer-despite-b --- app/assets/images/exclamation.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/images/exclamation.svg b/app/assets/images/exclamation.svg index 7c5e6d28f..5998192ad 100644 --- a/app/assets/images/exclamation.svg +++ b/app/assets/images/exclamation.svg @@ -1,7 +1,7 @@ + viewBox="0 0 17.5 14.5" width="17.5" height="14.5" style="enable-background:new 0 0 17.5 14.5;" xml:space="preserve">