Skip to content

Build your personal knowledge base with Trilium Notes

fix(ckeditor): size slash-command palette icons to the icon box

Elian Doran776c2f1b4066
diff --git a/packages/ckeditor5/src/theme/slash_commands.css b/packages/ckeditor5/src/theme/slash_commands.css
index 139c750184..4e8ed57c72 100644
--- a/packages/ckeditor5/src/theme/slash_commands.css
+++ b/packages/ckeditor5/src/theme/slash_commands.css
@@ -26,6 +26,19 @@
border-radius: 2px;
color: var(--ck-color-base-text);
background-color: var(--ck-color-base-background);
+
+ /*
+ * Premium put `ck-icon` on the `<svg>` itself (via `IconView`), so CKEditor's core
+ * `.ck.ck-icon { width/height: var(--ck-icon-size) }` sized the glyph. Here the class is on
+ * a wrapping span and the raw `<svg>` — injected via innerHTML from mixed sources (CKEditor
+ * 20px viewBoxes, 24px boxicons, custom footnote/math art) — is left unconstrained and
+ * renders at its intrinsic size. Pin it to the icon box so every source lands the same size.
+ */
+ & > svg {
+ display: block;
+ width: var(--ck-icon-size);
+ height: var(--ck-icon-size);
+ }
}
& > .ck-slash-command-button__text-part {