From 4f6fa840c331d7a23cce1cbaf0aee874d40c3a9d Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Wed, 6 Mar 2024 08:45:49 -0500 Subject: [PATCH] Use `100svh` everywhere `100vh` is used Related issue: https://github.com/uBlockOrigin/uBlock-issues/issues/3058 --- src/css/1p-filters.css | 1 + src/css/advanced-settings.css | 1 + src/css/asset-viewer.css | 1 + src/css/code-viewer.css | 1 + src/css/dashboard.css | 6 ++---- src/css/devtools.css | 1 + src/css/dom-inspector.css | 1 + src/css/dyna-rules.css | 1 + src/css/epicker-ui.css | 1 + src/css/logger-ui.css | 2 ++ src/css/popup-fenix.css | 1 + src/css/whitelist.css | 1 + src/js/scriptlets/epicker.js | 1 + 13 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/css/1p-filters.css b/src/css/1p-filters.css index f6498c493..9e087cb7e 100644 --- a/src/css/1p-filters.css +++ b/src/css/1p-filters.css @@ -1,5 +1,6 @@ html { height: 100vh; + height: 100svh; overflow: hidden; width: 100vw; } diff --git a/src/css/advanced-settings.css b/src/css/advanced-settings.css index c67e75070..10225dd95 100644 --- a/src/css/advanced-settings.css +++ b/src/css/advanced-settings.css @@ -1,5 +1,6 @@ html { height: 100vh; + height: 100svh; overflow: hidden; width: 100vw; } diff --git a/src/css/asset-viewer.css b/src/css/asset-viewer.css index 8b6f1da18..d2df68a1e 100644 --- a/src/css/asset-viewer.css +++ b/src/css/asset-viewer.css @@ -23,6 +23,7 @@ body { display: flex; flex-direction: column; height: 100vh; + height: 100svh; margin: 0; overflow: hidden; padding: 0; diff --git a/src/css/code-viewer.css b/src/css/code-viewer.css index 774fa69ef..40b511448 100644 --- a/src/css/code-viewer.css +++ b/src/css/code-viewer.css @@ -3,6 +3,7 @@ body { display: flex; flex-direction: column; height: 100vh; + height: 100svh; margin: 0; overflow: hidden; padding: 0; diff --git a/src/css/dashboard.css b/src/css/dashboard.css index ee03ed179..3a45a65be 100644 --- a/src/css/dashboard.css +++ b/src/css/dashboard.css @@ -2,6 +2,7 @@ html, body { display: flex; flex-direction: column; height: 100vh; + height: 100svh; justify-content: stretch; overflow: hidden; position: relative; @@ -75,6 +76,7 @@ iframe { } #unsavedWarning > div:last-of-type { height: 100vh; + height: 100svh; position: absolute; width: 100vw; } @@ -105,10 +107,6 @@ body.noDashboard #dashboard-nav { border-bottom-color: var(--dashboard-tab-hover-border); } -/* touch-screen devices */ -:root.mobile, :root.mobile body { - height: 100svh; - } :root.mobile #dashboard-nav { flex-wrap: nowrap; overflow-x: auto; diff --git a/src/css/devtools.css b/src/css/devtools.css index 425aac475..bb4c40dc8 100644 --- a/src/css/devtools.css +++ b/src/css/devtools.css @@ -1,5 +1,6 @@ html { height: 100vh; + height: 100svh; overflow: hidden; width: 100vw; } diff --git a/src/css/dom-inspector.css b/src/css/dom-inspector.css index 71ba34826..2f2ca14e1 100644 --- a/src/css/dom-inspector.css +++ b/src/css/dom-inspector.css @@ -3,6 +3,7 @@ html#ublock0-inspector, background: transparent; box-sizing: border-box; height: 100vh; + height: 100svh; margin: 0; overflow: hidden; width: 100vw; diff --git a/src/css/dyna-rules.css b/src/css/dyna-rules.css index 35e0f8cbb..9a6bd8d5c 100644 --- a/src/css/dyna-rules.css +++ b/src/css/dyna-rules.css @@ -1,5 +1,6 @@ html { height: 100vh; + height: 100svh; overflow: hidden; width: 100vw; } diff --git a/src/css/epicker-ui.css b/src/css/epicker-ui.css index 01d3f05af..8ce5ade80 100644 --- a/src/css/epicker-ui.css +++ b/src/css/epicker-ui.css @@ -3,6 +3,7 @@ html#ublock0-epicker, background: transparent; cursor: not-allowed; height: 100vh; + height: 100svh; margin: 0; overflow: hidden; width: 100vw; diff --git a/src/css/logger-ui.css b/src/css/logger-ui.css index baf410308..7ae632e6e 100644 --- a/src/css/logger-ui.css +++ b/src/css/logger-ui.css @@ -2,6 +2,7 @@ body { display: flex; flex-direction: column; height: 100vh; + height: 100svh; overflow: hidden; width: 100vw; } @@ -512,6 +513,7 @@ body[dir="rtl"] .closeButton { bottom: 0; display: none; max-height: min(800px, calc(100vh - 2rem)); + max-height: min(800px, calc(100svh - 2rem)); min-width: 360px; overflow: hidden; position: fixed; diff --git a/src/css/popup-fenix.css b/src/css/popup-fenix.css index 60cd39def..b845562d3 100644 --- a/src/css/popup-fenix.css +++ b/src/css/popup-fenix.css @@ -300,6 +300,7 @@ body.needSave #revertRules { } :root.desktop body.vMin #firewall { max-height: 100vh; + max-height: 100svh; } #firewall > * { direction: ltr; diff --git a/src/css/whitelist.css b/src/css/whitelist.css index 715c9640d..3248a77f6 100644 --- a/src/css/whitelist.css +++ b/src/css/whitelist.css @@ -1,5 +1,6 @@ html { height: 100vh; + height: 100svh; overflow: hidden; width: 100vw; } diff --git a/src/js/scriptlets/epicker.js b/src/js/scriptlets/epicker.js index 9e75b53cc..41b0b76bd 100644 --- a/src/js/scriptlets/epicker.js +++ b/src/js/scriptlets/epicker.js @@ -1255,6 +1255,7 @@ const pickerCSSStyle = [ 'display: block', 'filter: none', 'height: 100vh', + ' height: 100svh', 'left: 0', 'margin: 0', 'max-height: none',