Skip to content

Build your personal knowledge base with Trilium Notes

style/tree items: display a fallback icon when the specified icon pack is missing

Adorian Doran3b9f765c24a2
diff --git a/apps/client/src/stylesheets/tree.css b/apps/client/src/stylesheets/tree.css
index cb354d30df..a791f0578b 100644
--- a/apps/client/src/stylesheets/tree.css
+++ b/apps/client/src/stylesheets/tree.css
@@ -140,10 +140,22 @@ ul.fancytree-container {
background-color: inherit;
}
+
.fancytree-custom-icon {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ width: 1em;
+ height: 1em;
font-size: 1.2em;
}
+/* Fallback icon */
+:where(.fancytree-custom-icon)::before {
+ content: "?";
+}
+
+/* Protected note icon badge */
span.fancytree-node.protected > span.fancytree-custom-icon {
filter: drop-shadow(2px 2px 2px var(--main-text-color));
}