Skip to content

Build your personal knowledge base with Trilium Notes

style/button group: fix the appearance of the active button

Adorian Dorancef242a9ce77
diff --git a/apps/client/src/stylesheets/style.css b/apps/client/src/stylesheets/style.css
index e3372b4af2..ea55db0410 100644
--- a/apps/client/src/stylesheets/style.css
+++ b/apps/client/src/stylesheets/style.css
@@ -592,11 +592,6 @@ button.btn-sm {
color: var(--left-pane-text-color);
}
-.btn.active:not(.btn-primary) {
- background-color: var(--button-disabled-background-color) !important;
- opacity: 0.4;
-}
-
.ck.ck-block-toolbar-button {
transform: translateX(7px);
color: var(--muted-text-color);
diff --git a/apps/client/src/stylesheets/theme-next-dark.css b/apps/client/src/stylesheets/theme-next-dark.css
index fbb8d15468..72271ad2ea 100644
--- a/apps/client/src/stylesheets/theme-next-dark.css
+++ b/apps/client/src/stylesheets/theme-next-dark.css
@@ -41,6 +41,9 @@
--cmd-button-keyboard-shortcut-color: white;
--cmd-button-disabled-opacity: 0.5;
+ --button-group-active-button-background: #ffffff4e;
+ --button-group-active-button-text-color: white;
+
--icon-button-color: currentColor;
--icon-button-hover-background: var(--hover-item-background-color);
--icon-button-hover-color: var(--hover-item-text-color);
diff --git a/apps/client/src/stylesheets/theme-next-light.css b/apps/client/src/stylesheets/theme-next-light.css
index f736538a8f..780d519f70 100644
--- a/apps/client/src/stylesheets/theme-next-light.css
+++ b/apps/client/src/stylesheets/theme-next-light.css
@@ -41,6 +41,9 @@
--cmd-button-keyboard-shortcut-color: black;
--cmd-button-disabled-opacity: 0.5;
+ --button-group-active-button-background: #00000026;
+ --button-group-active-button-text-color: black;
+
--icon-button-color: currentColor;
--icon-button-hover-background: var(--hover-item-background-color);
--icon-button-hover-color: var(--hover-item-text-color);
diff --git a/apps/client/src/stylesheets/theme-next/forms.css b/apps/client/src/stylesheets/theme-next/forms.css
index b5991b4d74..fb53f167d4 100644
--- a/apps/client/src/stylesheets/theme-next/forms.css
+++ b/apps/client/src/stylesheets/theme-next/forms.css
@@ -146,6 +146,14 @@ button.btn.btn-success kbd {
outline: 2px solid var(--input-focus-outline-color);
}
+/* Button groups */
+
+/* Active button */
+:root .btn-group button.btn.active {
+ background-color: var(--button-group-active-button-background);
+ color: var(--button-group-active-button-text-color);
+}
+
/*
* Input boxes
*/