diff --git a/app/coffee/modules/common/confirm.coffee b/app/coffee/modules/common/confirm.coffee index bb8ff5ef..4d55b4e8 100644 --- a/app/coffee/modules/common/confirm.coffee +++ b/app/coffee/modules/common/confirm.coffee @@ -173,14 +173,17 @@ class ConfirmService extends taiga.Service if icon.type == "img" detailImage = $('').addClass('lb-icon').attr('src', icon.name) else if icon.type == "svg" + detailImage = document.createElement("div") + taiga.addClass(detailImage, "icon") + taiga.addClass(detailImage, icon.name) + taiga.addClass(detailImage, "lb-icon") + + svgContainer = document.createElementNS("http://www.w3.org/2000/svg", "svg") + useSVG = document.createElementNS('http://www.w3.org/2000/svg', 'use') useSVG.setAttributeNS('http://www.w3.org/1999/xlink','href', '#' + icon.name) - detailImage = document.createElementNS("http://www.w3.org/2000/svg", "svg") - taiga.addClass(detailImage, "icon") - taiga.addClass(detailImage, "lb-icon") - taiga.addClass(detailImage, icon.name) - detailImage.appendChild(useSVG) + detailImage.appendChild(svgContainer).appendChild(useSVG) if detailImage el.find('section').prepend(detailImage) diff --git a/app/styles/dependencies/helpers.scss b/app/styles/dependencies/helpers.scss index 9125f084..b7d66bfb 100644 --- a/app/styles/dependencies/helpers.scss +++ b/app/styles/dependencies/helpers.scss @@ -55,10 +55,14 @@ transition: opacity .3s ease; } .lb-icon { - @include svg-size(6rem); - display: block; - fill: $whitish; margin: 1rem auto; + display: flex; + justify-content: center; + svg { + @include svg-size(6rem); + display: block; + fill: $whitish; + } } .title { text-align: center;