From a94b58af6ec0921fc6014d2a922085c90dd93238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Fri, 15 Mar 2024 11:57:31 +0100 Subject: [PATCH] MOBILE-4456 icons: Do not apply colors if svg has styles --- src/core/components/mod-icon/mod-icon.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/components/mod-icon/mod-icon.ts b/src/core/components/mod-icon/mod-icon.ts index b616f5070..3428e0026 100644 --- a/src/core/components/mod-icon/mod-icon.ts +++ b/src/core/components/mod-icon/mod-icon.ts @@ -354,6 +354,11 @@ export class CoreModIconComponent implements OnInit, OnChanges { scripts[i].parentNode?.removeChild(scripts[i]); } + // Has own styles, do not apply colors. + if (doc.documentElement.getElementsByTagName('style').length > 0) { + this.isBranded = true; + } + // Recursively remove attributes starting with on. const removeAttributes = (element: Element): void => { Array.from(element.attributes).forEach((attr) => {