diff --git a/src/core/islands/Panel.mjs b/src/core/islands/Panel.mjs index e37c8fd..e93af04 100644 --- a/src/core/islands/Panel.mjs +++ b/src/core/islands/Panel.mjs @@ -210,6 +210,7 @@ function Panel({ if (!$panel.hasAttribute("open")) width = 0; const $cssVarTarget = $panel.parentElement || $panel; $cssVarTarget.style.setProperty("--panel--width", `${width}px`); + if ($cssVarTarget !== $panel) $panel.style.removeProperty("--panel--width"); repositionHelp(width); }; $panel.open = () => {