From 3660c3b89e235e8ea4963a349142e09ec9006445 Mon Sep 17 00:00:00 2001 From: Emma Segal-Grossman Date: Fri, 3 Oct 2025 15:30:55 -0400 Subject: [PATCH] Ensure icon size is applied just to outer SVG (#458) Due to changes in chrome (https://issues.chromium.org/issues/40409865), width and height presentation attributes within nested SVGs are now respected, which breaks icons styling in RWP. This fixes that by ensuring that the styling that sets width and height on the outer icon SVG _only_ applies to the outer SVG, allowing the inner SVG's intrinsic/declared size to be respected properly. Tested in latest chrome, firefox, and safari on macos. Fixes #457 --- src/misc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/misc.ts b/src/misc.ts index a23c808..191bc29 100644 --- a/src/misc.ts +++ b/src/misc.ts @@ -85,7 +85,7 @@ class FaIcon extends LitElement { margin: 0; line-height: 1em; } - :host svg { + :host > svg { fill: var(--fa-icon-fill-color, currentcolor); width: var(--fa-icon-width, 19px); height: var(--fa-icon-height, 19px);