From f9ddd0f0a48bd6c4d6607aa7dfb9853d2097ea9a Mon Sep 17 00:00:00 2001 From: Lesley Norton Date: Fri, 22 Oct 2021 22:24:39 -0500 Subject: [PATCH] Fix UI when Popup is in overflow menu --- src/css/popup.css | 13 +++++++++++++ src/js/popup.js | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/css/popup.css b/src/css/popup.css index 42311cb..0590528 100644 --- a/src/css/popup.css +++ b/src/css/popup.css @@ -62,6 +62,19 @@ body { color: var(--text-grey); } +.overflow body, +.overflow html { + inline-size: 100%; +} + +.overflow .container-panel { + min-block-size: 100%; +} + +.overflow .panel.onboarding { + margin-block: auto; +} + html, body { block-size: 100%; /* Bugfix: issue 948 */ diff --git a/src/js/popup.js b/src/js/popup.js index fa14383..33ddb09 100644 --- a/src/js/popup.js +++ b/src/js/popup.js @@ -2159,8 +2159,8 @@ window.addEventListener("resize", function () { const difference = window.innerWidth - document.body.offsetWidth; if (difference > 2) { //if popup is in the overflow menu, window will be larger than 300px + const root = document.documentElement; - root.style.setProperty("--overflow-size", difference + "px"); - root.style.setProperty("--icon-fit", "12"); + root.classList.add("overflow"); } });