Skip to content

Build your personal knowledge base with Trilium Notes

style(legacy): apply context menu fixes on mobile

Elian Doran68805ddd49f5
diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css
index 06625ef776..25b046f06f 100644
--- a/src/public/stylesheets/style.css
+++ b/src/public/stylesheets/style.css
@@ -974,6 +974,30 @@ a.external:not(.no-arrow):after, a[href^="http://"]:not(.no-arrow):after, a[href
/* !!! Cannot set overflow: auto, submenus will break !!! */
}
+body.mobile #context-menu-container {
+ position: fixed !important;
+ left: 0 !important;
+ right: 0 !important;
+ bottom: 0 !important;
+ top: unset !important;
+ max-height: 70vh;
+ overflow: auto !important;
+ user-select: none;
+ -webkit-user-select: none;
+}
+
+body.mobile .dropdown-menu {
+ position: static !important;
+}
+
+body.mobile .dropdown-submenu > .dropdown-menu {
+ border: 0 !important;
+ padding: 0 !important;
+ overflow: hidden !important;
+ top: unset !important;
+ margin-top: 0 !important;
+}
+
#context-menu-container, #context-menu-container .dropdown-menu {
padding: 3px 0 0;
z-index: 2000;
diff --git a/src/public/stylesheets/theme-next/shell.css b/src/public/stylesheets/theme-next/shell.css
index 3b9751df2f..1229a6fcc8 100644
--- a/src/public/stylesheets/theme-next/shell.css
+++ b/src/public/stylesheets/theme-next/shell.css
@@ -485,18 +485,6 @@ div.quick-search .search-button.show {
--menu-item-icon-vert-offset: 1.5px;
}
-body.mobile #context-menu-container {
- position: fixed !important;
- left: 0 !important;
- right: 0 !important;
- bottom: 0 !important;
- top: unset !important;
- max-height: 70vh;
- overflow: auto !important;
- user-select: none;
- -webkit-user-select: none;
-}
-
/* Tree actions toolbar */
/* Toolbar container (collapsed state) */
@@ -951,19 +939,6 @@ body.mobile .dropdown-item:not(:last-of-type) {
margin-bottom: 0.5em;
}
-body.mobile .dropdown-menu {
- font-size: 1.05rem !important;
- position: static !important;
-}
-
-body.mobile .dropdown-submenu > .dropdown-menu {
- border: 0 !important;
- padding: 0 !important;
- overflow: hidden !important;
- top: unset !important;
- margin-top: 0 !important;
-}
-
body.mobile #launcher-pane .dropdown-submenu > .dropdown-toggle {
display: none;
}