Skip to content

Build your personal knowledge base with Trilium Notes

style(mobile): dim the page by one amount behind menus, sidebar and dialogs

Elian Doranb1582770d027
diff --git a/apps/client/src/stylesheets/style.css b/apps/client/src/stylesheets/style.css
index 50c2fc6031..be1950f5fe 100644
--- a/apps/client/src/stylesheets/style.css
+++ b/apps/client/src/stylesheets/style.css
@@ -65,6 +65,8 @@ body#trilium-app.backdrop-effects-disabled *::after {
--submenu-opening-delay: 150ms;
--launcher-pane-size: 53px;
--bs-body-color: var(--main-text-color);
+ /* What a menu, the sidebar or a dialog dims the page behind it with in the phone layout. */
+ --mobile-backdrop-color: rgba(0, 0, 0, 0.5);
}
html {
@@ -1899,7 +1901,17 @@ pre.code-embed-editor.read-only .cm-activeLine {
}
body.mobile .modal.show {
- background-color: rgba(0, 0, 0, 0.7);
+ background-color: var(--mobile-backdrop-color);
+ }
+
+ body.mobile .modal-backdrop {
+ background-color: transparent !important;
+ }
+
+ body.mobile > .tn-dropdown-portal > .tn-dropdown-backdrop,
+ body.mobile .tn-popover-backdrop {
+ background-color: var(--mobile-backdrop-color);
+ opacity: 1;
}
body.mobile .modal-dialog {
diff --git a/apps/client/src/stylesheets/theme-next/menus.css b/apps/client/src/stylesheets/theme-next/menus.css
index 724c314565..0895878f04 100644
--- a/apps/client/src/stylesheets/theme-next/menus.css
+++ b/apps/client/src/stylesheets/theme-next/menus.css
@@ -252,7 +252,7 @@ body.mobile #context-menu-cover {
transition: background-color 150ms ease-in;
&.show {
- background: rgba(0, 0, 0, 0.32);
+ background: var(--mobile-backdrop-color);
/* A tablet's menus open beside what opened them, undimmed; the cover only takes the tap
that closes them. */
diff --git a/apps/client/src/stylesheets/theme-next/shell.css b/apps/client/src/stylesheets/theme-next/shell.css
index 37b9c97620..7b370cb08d 100644
--- a/apps/client/src/stylesheets/theme-next/shell.css
+++ b/apps/client/src/stylesheets/theme-next/shell.css
@@ -671,7 +671,7 @@ body[dir=rtl] :is(#left-pane, .tree-popup-sidebar) span.fancytree-node.protected
@media (max-width: 991px) {
body.mobile #mobile-sidebar-container {
- background-color: rgba(0, 0, 0, 0.5);
+ background-color: var(--mobile-backdrop-color);
}
body.mobile #mobile-sidebar-wrapper {