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 editor/toolbar: improve appearance, fix regressions
Adorian Doranf88e6d0ed795
diff --git a/apps/client/src/stylesheets/theme-next/notes/text.css b/apps/client/src/stylesheets/theme-next/notes/text.cssindex 32fc5ee24a..aa230f0bda 100644--- a/apps/client/src/stylesheets/theme-next/notes/text.css+++ b/apps/client/src/stylesheets/theme-next/notes/text.css@@ -88,7 +88,7 @@/* Dropdown body */:root .ck.ck-dropdown__panel,-:root .ck.ck-balloon-panel {+:root .ck.ck-balloon-panel:not(.ck-tooltip) {--ck-editor-popup-padding: 4px;--ck-color-panel-background: var(--menu-background-color);@@ -157,15 +157,15 @@/* Tooltip */:root div.ck.ck-balloon-panel.ck-tooltip {- --ck-color-panel-background: var(--toast-background); /* Arrow */- border-color: transparent !important;- border-radius: 6px !important;- padding: 0 10px 2px 10px;- background-color: var(--toast-background) !important;-}+ --ck-rounded-corners-radius: var(--tooltip-border-radius);+ --ck-balloon-border-width: 0;+ --ck-color-panel-background: var(--tooltip-background-color);+ --ck-color-tooltip-text: var(--tooltip-foreground-color);-:root div.ck.ck-balloon-panel.ck-tooltip * {- color: var(--toast-text-color) !important;+ backdrop-filter: var(--tooltip-backdrop-filter);+ padding: var(--tooltip-padding);+ box-shadow: var(--tooltip-box-shadow);+ font-size: var(--tooltip-font-size);}/* Dropdown list item */@@ -198,7 +198,7 @@/* List item checkmark container */-:root .ck.ck-list-item-button .ck-list-item-button__check-holder {+:root .ck.ck-list-item-button .ck.ck-list-item-button__check-holder {margin-inline-start: var(--ck-spacing-small);margin-inline-end: var(--menu-padding-size);}@@ -276,13 +276,13 @@min-height: 2rem !important;}-.ck-fontsize-option.text-tiny {--size: .75em;}-.ck-fontsize-option.text-small {--size: .85em;}-.ck-fontsize-option.text-big {--size: 1.4em;}-.ck-fontsize-option.text-huge {--size: 1.8em;}+.ck-fontsize-option.text-tiny {--_size: .75em;}+.ck-fontsize-option.text-small {--_size: .85em;}+.ck-fontsize-option.text-big {--_size: 1.4em;}+.ck-fontsize-option.text-huge {--_size: 1.8em;}-:root .ck-fontsize-option .ck-button__label {- font-size: var(--size);+:root .ck-fontsize-option .ck.ck-button__label {+ font-size: var(--_size);}/* Color picker dropdown */@@ -390,6 +390,9 @@/* Text snippet dropdown */div.ck-template-form {+ --ck-template-icon-size: 38px;+ --ck-color-list-button-hover-background: var(--hover-item-background-color);+padding: 8px;}@@ -397,10 +400,28 @@ div.ck-template-form .ck-labeled-field-view {margin-bottom: 8px;}+:root div.ck.ck-template-form .ck.ck-search__results {+ border-top: 0;+}++:root .ck.ck-template-form > .ck-search__results > .ck.ck-list.ck-template-list {+ padding-top: 0;+}+/* Template item */-:root div.ck-template-form li.ck-list__item button.ck-template-button {- padding: 4px 8px;+:root .ck.ck-template-form > .ck-search__results > .ck.ck-list.ck-template-list > .ck.ck-list__item:not(.ck-hidden) ~ .ck.ck-list__item {+ margin-top: 2px; /* Item gap */+}++:root .ck.ck-template-form > .ck-search__results > .ck.ck-list.ck-template-list > .ck.ck-list__item > .ck.ck-button {+ --ck-spacing-large: 8px; /* The gap between the icon and the text */++ padding: 2px 8px;+}++:root .ck.ck-template-form > .ck-search__results > .ck.ck-list.ck-template-list > .ck.ck-list__item > .ck.ck-button:not(:focus) {+ border-color: transparent;}/* Template icon */@@ -408,25 +429,51 @@ div.ck-template-form .ck-labeled-field-view {--ck-spacing-medium: 2px;}-:root div.ck-template-form .note-icon {- color: var(--menu-item-icon-color);+:root div.ck-template-form .ck-icon foreignObject {+ position: relative;++ &::before {+ display: block;+ content: "";+ position: absolute;+ inset: 2px;+ border-radius: 50%;+ background: var(--note-icon-hover-background-color);+ z-index: -1;+ }+}++:root div.ck-template-form .ck-icon .note-icon {+ display: flex;+ height: 100%;+ justify-content: center;+ align-items: center;+ color: var(--note-icon-color);}/* Template name */div.ck-template-form .ck-template-form__text-part {color: var(--hover-item-text-color);+font-size: .9rem;}div.ck-template-form .ck-template-form__text-part mark {- background: unset;+ --ck-color-highlight-background: transparent;+color: var(--quick-search-result-highlight-color);+ text-decoration: underline;font-weight: bold;}/* Template description */:root div.ck-template-form .ck-template-form__description {- opacity: .5;+ --ck-spacing-tiny: 0; /* Used for the top margin */++ display: block;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap !important;font-size: .9em;}@@ -531,7 +578,7 @@ button.ck.ck-button:is(.ck-button-action, .ck-button-save, .ck-button-cancel).ckmargin-top: var(--ck-input-label-height);}-.ck.ck-form__header {+:root .ck.ck-form__header {border-bottom: none;}