Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
style(text): draw slash command icons smaller
Elian Doran9a143474579d
diff --git a/packages/ckeditor5/src/theme/slash_commands.css b/packages/ckeditor5/src/theme/slash_commands.cssindex ebe2aed611..873baad579 100644--- a/packages/ckeditor5/src/theme/slash_commands.css+++ b/packages/ckeditor5/src/theme/slash_commands.css@@ -21,6 +21,7 @@* the text would either stop short of the row's edge or overflow it.*/--ck-slash-command-description-width: calc(var(--ck-slash-command-button-width) - 4.8em);+ --tn-slash-command-icon-size: calc(var(--ck-icon-size) * 0.8);}:is(.ck-mentions, .ck-mention-list) .ck.ck-button.ck-slash-command-button {@@ -34,6 +35,8 @@box-sizing: initial;margin: 0 var(--ck-spacing-small) 0 0;padding: 5px;+ width: var(--tn-slash-command-icon-size);+ height: var(--tn-slash-command-icon-size);/** Premium put `ck-icon` on the `<svg>` itself (via `IconView`), so CKEditor's core@@ -60,14 +63,14 @@justify-content: center;/*- * The glyph is sized on the inner span, never on the chip: core's `.ck.ck-icon`- * width/height use the em-relative `--ck-icon-size`, so a bigger font on the chip+ * The glyph is sized on the inner span, never on the chip: the chip's width and height+ * use the em-relative `--tn-slash-command-icon-size`, so a bigger font on the chip* itself would inflate the chip box (and the whole row) along with the glyph. On the* child, the calc resolves against the chip's untouched font-size, which is also what- * `width: var(--ck-icon-size)` resolved against — so 0.85 means 85% of the content box.+ * the chip's width resolves against, so 0.85 means 85% of the content box.*/& > span {- font-size: calc(var(--ck-icon-size) * 0.85);+ font-size: calc(var(--tn-slash-command-icon-size) * 0.85);line-height: 1;}}