Skip to content

Build your personal knowledge base with Trilium Notes

fix(right pane): cards stretched to equal heights on Firefox

Elian Dorand87bfb46e562
diff --git a/apps/client/src/widgets/sidebar/RightPanelContainer.css b/apps/client/src/widgets/sidebar/RightPanelContainer.css
index 5ef09b07c6..e93b2cee4a 100644
--- a/apps/client/src/widgets/sidebar/RightPanelContainer.css
+++ b/apps/client/src/widgets/sidebar/RightPanelContainer.css
@@ -312,8 +312,12 @@ body.layout-horizontal #vertical-main-container {
nothing to put there (`max-content`), and what is handed back is offered again to the cards
still short. So the sections with a row or two in them are shown whole and the long one takes
everything left over — instead of each section being cropped a little for the sake of a
- section that had room to spare. */
- @supports (max-height: max-content) {
+ section that had room to spare.
+
+ Firefox parses `max-height: max-content` but does not cap a box's height with it, which would
+ leave every card at an equal share. `-moz-orient` is a Firefox-only property, so Firefox takes
+ the content-height fallback above instead. */
+ @supports (max-height: max-content) and (not (-moz-orient: inline)) {
.right-pane-tab-body:has(> .card:not(.collapsed) ~ .card:not(.collapsed)) > .card:not(.collapsed):not(.grow) {
/* Offered from nothing rather than from its content: a card asking for its content up
front leaves the pane over-subscribed, and nothing to hand back out. */