Skip to content

Build your personal knowledge base with Trilium Notes

style(next)/formatting toolbar: restyle the buttons in the "on" state

Adorian Doran6aae91ca69e7
diff --git a/apps/client/src/stylesheets/theme-next-dark.css b/apps/client/src/stylesheets/theme-next-dark.css
index 88ac611373..a5cce76e3e 100644
--- a/apps/client/src/stylesheets/theme-next-dark.css
+++ b/apps/client/src/stylesheets/theme-next-dark.css
@@ -237,6 +237,10 @@
--help-code-background: #565656;
--ck-editor-popup-border-color: var(--modal-border-color);
+
+ --ck-editor-toolbar-button-on-background: #ffffff3b;
+ --ck-editor-toolbar-button-on-color: white;
+ --ck-editor-toolbar-button-on-shadow: 1px 1px 2px rgba(0, 0, 0, .75);
}
/*
diff --git a/apps/client/src/stylesheets/theme-next-light.css b/apps/client/src/stylesheets/theme-next-light.css
index af02177653..a7ddd5b06f 100644
--- a/apps/client/src/stylesheets/theme-next-light.css
+++ b/apps/client/src/stylesheets/theme-next-light.css
@@ -237,4 +237,7 @@
--help-code-background: #d7d5d5;
--ck-editor-popup-border-color: var(--dropdown-border-color);
+ --ck-editor-toolbar-button-on-background: #00000017;
+ --ck-editor-toolbar-button-on-color: black;
+ --ck-editor-toolbar-button-on-shadow: 1px 1px 1px rgba(0, 0, 0, .35);
}
diff --git a/apps/client/src/stylesheets/theme-next/notes/text.css b/apps/client/src/stylesheets/theme-next/notes/text.css
index 434f2233eb..ff949e0bec 100644
--- a/apps/client/src/stylesheets/theme-next/notes/text.css
+++ b/apps/client/src/stylesheets/theme-next/notes/text.css
@@ -27,6 +27,12 @@
--ck-border-radius: 6px;
}
+.ck-button.ck-on:not(.ck-dropdown__button) {
+ --ck-color-button-on-background: var(--ck-editor-toolbar-button-on-background);
+ --ck-color-button-on-color: var(--ck-editor-toolbar-button-on-color);
+ box-shadow: var(--ck-editor-toolbar-button-on-shadow);
+}
+
/* Disabled button */
:root .classic-toolbar-widget .ck.ck-button.ck-disabled {
opacity: .75;