From a3838734c56ffb3d1e28bdde892346bda6f3b85e Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Wed, 11 Sep 2024 11:55:06 +1000 Subject: [PATCH] Set max-height for all modals (#5242) --- ui/v2.5/src/components/Help/styles.scss | 5 +++++ ui/v2.5/src/components/List/styles.scss | 3 +-- ui/v2.5/src/index.scss | 6 ++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ui/v2.5/src/components/Help/styles.scss b/ui/v2.5/src/components/Help/styles.scss index 311876ea273..cf53f48f644 100644 --- a/ui/v2.5/src/components/Help/styles.scss +++ b/ui/v2.5/src/components/Help/styles.scss @@ -21,6 +21,11 @@ padding-left: 2rem; } + .modal-body { + // reset max-height so that we don't end up with two scroll bars + max-height: initial; + } + .manual-content, .manual-toc { max-height: calc(100vh - 10rem); diff --git a/ui/v2.5/src/components/List/styles.scss b/ui/v2.5/src/components/List/styles.scss index 632ac9533fc..9f9519b351f 100644 --- a/ui/v2.5/src/components/List/styles.scss +++ b/ui/v2.5/src/components/List/styles.scss @@ -154,6 +154,7 @@ input[type="range"].zoom-slider { } .modal-body { + max-height: min(550px, calc(100vh - 12rem)); padding-left: 0; padding-right: 0; } @@ -166,8 +167,6 @@ input[type="range"].zoom-slider { .criterion-list { flex-direction: column; flex-wrap: nowrap; - max-height: 550px; - overflow-y: auto; .pinned-criterion-divider { padding-bottom: 2.5rem; diff --git a/ui/v2.5/src/index.scss b/ui/v2.5/src/index.scss index a2dce6acb92..8ad3ee1782a 100755 --- a/ui/v2.5/src/index.scss +++ b/ui/v2.5/src/index.scss @@ -1385,3 +1385,9 @@ select { .table-list .rating-number { width: 6rem; } + +.modal-body { + max-height: calc(100vh - 12rem); + overflow-y: auto; + padding-right: 1.5rem; +}