Skip to content

Build your personal knowledge base with Trilium Notes

fix(menus): pad every popup at the sides under the legacy theme

Elian Doranb22b00245c97
diff --git a/apps/client/src/widgets/react/Popup.css b/apps/client/src/widgets/react/Popup.css
index 80448c49f2..9d07709897 100644
--- a/apps/client/src/widgets/react/Popup.css
+++ b/apps/client/src/widgets/react/Popup.css
@@ -144,12 +144,17 @@ body[dir=rtl] .tn-popup[data-reveal]:is([data-reveal="bottom-end"], [data-reveal
}
/*
- * The frame's padding, which the scrollers and menu pages inside it reach past. The theme's
- * `.dropdown-menu:not(.static)` rule sets the same value; Bootstrap's covers a theme that sets none.
+ * The padding of a popup's frame, which the scrollers and menu pages inside it reach past. The
+ * theme's `.dropdown-menu:not(.static)` rule sets the same value. Set through Bootstrap's variables,
+ * so a component's own `padding` on its frame still wins.
*/
-.dropdown-menu:has(> :is(.tn-menu-scroll, .tn-menu-filterable, .tn-menu-page, .tn-panel-scroll)) {
- --tn-popup-padding: var(--padding, var(--menu-padding-size, var(--bs-dropdown-padding-y)));
- padding: var(--tn-popup-padding);
+.dropdown-menu:is(
+ .tn-popup,
+ :has(> :is(.tn-menu-scroll, .tn-menu-filterable, .tn-menu-page, .tn-panel-scroll))
+) {
+ --tn-popup-padding: var(--padding, var(--menu-padding-size, .5rem));
+ --bs-dropdown-padding-x: var(--tn-popup-padding);
+ --bs-dropdown-padding-y: var(--tn-popup-padding);
}
.tn-menu-scroll,