Skip to content

Build your personal knowledge base with Trilium Notes

fix(text): highlight a linked tab

Elian Doran5f133b908149
diff --git a/apps/client/src/services/block_reference.css b/apps/client/src/services/block_reference.css
index d0729b8914..1549d00cd0 100644
--- a/apps/client/src/services/block_reference.css
+++ b/apps/client/src/services/block_reference.css
@@ -27,6 +27,26 @@
inset 0 0 0 100vmax var(--block-reference-flash-color);
}
+/* A tab is `display: contents` (tabs.css), so its title and panel paint the effect instead. */
+.trilium-tab.block-reference-flash > :is(.trilium-tab-title, .trilium-tab-panel) {
+ animation: block-reference-flash-tab 1.5s ease-out;
+}
+
+.trilium-tab.block-reference-highlight > :is(.trilium-tab-title, .trilium-tab-panel) {
+ box-shadow: inset 0 0 0 100vmax var(--block-reference-flash-color);
+}
+
+@keyframes block-reference-flash-tab {
+ from,
+ 30% {
+ box-shadow: inset 0 0 0 100vmax var(--block-reference-flash-color);
+ }
+
+ to {
+ box-shadow: inset 0 0 0 100vmax transparent;
+ }
+}
+
.block-reference-broken {
color: var(--block-reference-broken-color);
font-style: italic;