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/tooltips: use own style for keyboard shortcuts
Adorian Dorand95b59dbf64f
diff --git a/apps/client/src/stylesheets/theme-next-dark.css b/apps/client/src/stylesheets/theme-next-dark.cssindex 92e7ca0cfe..7bdd242539 100644--- a/apps/client/src/stylesheets/theme-next-dark.css+++ b/apps/client/src/stylesheets/theme-next-dark.css@@ -289,7 +289,10 @@--tooltip-background-color: rgba(67, 67, 67, 0.86);--tooltip-foreground-color: #ffffffeb;--tooltip-shadow-color: rgba(0, 0, 0, 0.4);-+ --tooltip-kbd-color: white;+ --tooltip-kbd-background: #ffffff32;+ --tooltip-kbd-border: #00000060;+--note-tooltip-background-color: #3d3d3d;--help-background-color: var(--menu-background-color);diff --git a/apps/client/src/stylesheets/theme-next-light.css b/apps/client/src/stylesheets/theme-next-light.cssindex ff1652fc3c..d11cecf216 100644--- a/apps/client/src/stylesheets/theme-next-light.css+++ b/apps/client/src/stylesheets/theme-next-light.css@@ -288,6 +288,9 @@--tooltip-background-color: rgba(0, 0, 0, 0.818);--tooltip-foreground-color: #ffffffeb;--tooltip-shadow-color: rgba(0, 0, 0, 0.2);+ --tooltip-kbd-color: white;+ --tooltip-kbd-background: #ffffff32;+ --tooltip-kbd-border: #00000060;--note-tooltip-background-color: white;diff --git a/apps/client/src/stylesheets/theme-next/base.css b/apps/client/src/stylesheets/theme-next/base.cssindex 92a92c99e2..c0410f0b70 100644--- a/apps/client/src/stylesheets/theme-next/base.css+++ b/apps/client/src/stylesheets/theme-next/base.css@@ -598,6 +598,28 @@ li.dropdown-item a.dropdown-item-button:focus-visible {margin: 0;}+/* Keyboard shortcut. Note tooltips are excluded: their body is rendered note content, so+ any <kbd> in there is styled as content (see `.ck-content kbd` in dialogs.css). */+.tooltip:not(.note-tooltip) .tooltip-inner kbd {+ display: inline-block;+ margin: 0 2px 2px;+ border: 1px solid var(--tooltip-kbd-border);+ border-radius: 5px;+ padding: 2px 8px;+ background: var(--tooltip-kbd-background);+ box-shadow:+ 0 2px 0 var(--tooltip-kbd-border),+ inset 0 -1px 0 var(--tooltip-kbd-border);+ color: var(--tooltip-kbd-color);+ font-family: var(--main-font-family);+ font-size: 0.75em;+ font-weight: normal;+ line-height: 1.4;+ letter-spacing: 0.5pt;+ vertical-align: 1px;+ white-space: nowrap;+}+/** NOTE TOOLTIPS*/diff --git a/apps/client/src/stylesheets/theme-next/dialogs.css b/apps/client/src/stylesheets/theme-next/dialogs.cssindex 7ddcf4d365..467f0401af 100644--- a/apps/client/src/stylesheets/theme-next/dialogs.css+++ b/apps/client/src/stylesheets/theme-next/dialogs.css@@ -380,10 +380,9 @@ div.tn-tool-dialog {margin-top: 0.4em;}-/* Keyboard shortcut */+/* Keyboard shortcut. Tooltips have their own palette — see the TOOLTIPS section in base.css. */.help-dialog .help-cards kbd,-.ck-content kbd,-.text-editor-content-tooltip kbd {+.ck-content kbd {display: inline-block;margin: 0 2px 2px !important;border: 1px solid var(--help-kbd-shortcut-border);