Skip to content

Build your personal knowledge base with Trilium Notes

fix(text): size empty tab titles to their placeholder

Elian Dorandb6f99c65af8
diff --git a/packages/ckeditor5/src/theme/tabs.css b/packages/ckeditor5/src/theme/tabs.css
index 75216265e4..00ba7bc4ef 100644
--- a/packages/ckeditor5/src/theme/tabs.css
+++ b/packages/ckeditor5/src/theme/tabs.css
@@ -30,6 +30,16 @@
&:hover {
color: inherit;
}
+
+ /* CKEditor positions the placeholder absolutely, so it does not size the title. */
+ &.ck-placeholder::after {
+ content: attr(data-placeholder);
+ display: block;
+ height: 0;
+ overflow: hidden;
+ visibility: hidden;
+ white-space: nowrap;
+ }
}
& > .trilium-tab > .trilium-tab-panel {