Skip to content

Build your personal knowledge base with Trilium Notes

refactor(client): use var for modal max height

Elian Doran7d8af0f252a7
diff --git a/apps/client/src/stylesheets/style.css b/apps/client/src/stylesheets/style.css
index eb8bdfc7bc..b19016422a 100644
--- a/apps/client/src/stylesheets/style.css
+++ b/apps/client/src/stylesheets/style.css
@@ -25,7 +25,8 @@
--bs-body-font-weight: var(--main-font-weight) !important;
--bs-body-color: var(--main-text-color) !important;
--bs-body-bg: var(--main-background-color) !important;
- --ck-mention-list-max-height: 500px;
+ --ck-mention-list-max-height: 500px;
+ --tn-modal-max-height: 90vh;
}
body#trilium-app.motion-disabled *,
@@ -1329,7 +1330,7 @@ body.mobile #context-menu-container.mobile-bottom-menu {
inset-inline-end: 0 !important;
bottom: 0 !important;
top: unset !important;
- max-height: 90vh;
+ max-height: var(--tn-modal-max-height);
overflow: auto !important;
user-select: none;
-webkit-user-select: none;
@@ -1589,7 +1590,7 @@ body:not(.mobile) #launcher-pane.horizontal .dropdown-submenu > .dropdown-menu {
inset-inline-end: 0 !important;
transform: unset !important;
overflow-y: auto;
- max-height: calc(90vh - var(--dropdown-bottom));
+ max-height: calc(var(--tn-modal-max-height) - var(--dropdown-bottom));
}
#mobile-sidebar-container {
diff --git a/apps/client/src/widgets/dialogs/PopupEditor.css b/apps/client/src/widgets/dialogs/PopupEditor.css
index 14b6c30438..f72cf22749 100644
--- a/apps/client/src/widgets/dialogs/PopupEditor.css
+++ b/apps/client/src/widgets/dialogs/PopupEditor.css
@@ -15,7 +15,7 @@ body.desktop .modal.popup-editor-dialog .modal-dialog {
body.mobile .modal.popup-editor-dialog .modal-dialog {
max-width: 90vw;
- max-height: 90vh;
+ max-height: var(--tn-modal-max-height);
height: 100%;
}