Skip to content

Build your personal knowledge base with Trilium Notes

style(collections): drop the frosting from a maximized card or pane

Elian Doranfbf1f53ae4ea
diff --git a/apps/client/src/widgets/react/OverlayPanel.css b/apps/client/src/widgets/react/OverlayPanel.css
index fc7accebcd..30d7b5fe7a 100644
--- a/apps/client/src/widgets/react/OverlayPanel.css
+++ b/apps/client/src/widgets/react/OverlayPanel.css
@@ -21,6 +21,16 @@
backdrop-filter: var(--dropdown-backdrop-filter, blur(10px));
}
+/* Frosting suits a card standing over a canvas, not a panel grown to cover one: there is little
+ left to see through it, and a surface that size reads as smeared rather than glassy. The opaque
+ menu colour is the one the theme falls back to wherever the blur cannot be had (see the
+ `body.background-effects` rules in theme-next/base.css); the themes that state no such colour
+ have an opaque menu colour to begin with. */
+.tn-overlay-panel.maximized {
+ background: var(--menu-background-color-no-backdrop, var(--menu-background-color));
+ backdrop-filter: none;
+}
+
/*
* The head of the panel: a strip of tabs or a heading of one line, and beside either of them the
* button that sends the panel away. Only the placing of that button is this row's business — what
diff --git a/apps/client/src/widgets/react/Popover.css b/apps/client/src/widgets/react/Popover.css
index 68c5626463..b4f84a9ee8 100644
--- a/apps/client/src/widgets/react/Popover.css
+++ b/apps/client/src/widgets/react/Popover.css
@@ -41,6 +41,16 @@
display: none;
}
+/* Frosting suits a card standing beside something, not one grown to fill the window: there is
+ little left to see through it, and a surface that size reads as smeared rather than glassy. The
+ opaque menu colour is the one the theme falls back to wherever the blur cannot be had (see the
+ `body.background-effects` rules in theme-next/base.css); the themes that state no such colour
+ have an opaque menu colour to begin with. */
+.tn-popover.maximized {
+ background: var(--menu-background-color-no-backdrop, var(--menu-background-color));
+ backdrop-filter: none;
+}
+
/* The card's sibling rather than its child: `backdrop-filter` above makes the card the containing
block for anything fixed within it. */
.tn-popover-backdrop {