Skip to content

Build your personal knowledge base with Trilium Notes

style/note badges: extract colors as CSS variables

Adorian Doran0de9b219a54a
diff --git a/apps/client/src/stylesheets/theme-next-dark.css b/apps/client/src/stylesheets/theme-next-dark.css
index fc2113138c..bea87d14f8 100644
--- a/apps/client/src/stylesheets/theme-next-dark.css
+++ b/apps/client/src/stylesheets/theme-next-dark.css
@@ -202,6 +202,12 @@
--badge-background-color: #ffffff1a;
--badge-text-color: var(--muted-text-color);
+ --badge-temporaraily-editable-background-color: #4fa52b;
+ --badge-read-only-background-color: #e33f3b;
+ --badge-share-background-color: #3b82f6;
+ --badge-clipped-note-background-color: #57a2a5;
+ --badge-execute-background-color: #f59e0b;
+
--note-icon-background-color: #444444;
--note-icon-color: #d4d4d4;
--note-icon-hover-background-color: #555555;
diff --git a/apps/client/src/stylesheets/theme-next-light.css b/apps/client/src/stylesheets/theme-next-light.css
index c40b4c5eda..6214946d30 100644
--- a/apps/client/src/stylesheets/theme-next-light.css
+++ b/apps/client/src/stylesheets/theme-next-light.css
@@ -194,6 +194,12 @@
--badge-background-color: #00000011;
--badge-text-color: var(--muted-text-color);
+ --badge-temporaraily-editable-background-color: #4fa52b;
+ --badge-read-only-background-color: #e33f3b;
+ --badge-share-background-color: #3b82f6;
+ --badge-clipped-note-background-color: #57a2a5;
+ --badge-execute-background-color: #f59e0b;
+
--note-icon-background-color: #4f4f4f;
--note-icon-color: white;
--note-icon-hover-background-color: #737373;
diff --git a/apps/client/src/widgets/layout/NoteBadges.css b/apps/client/src/widgets/layout/NoteBadges.css
index fa3bc504ff..39fafd90ea 100644
--- a/apps/client/src/widgets/layout/NoteBadges.css
+++ b/apps/client/src/widgets/layout/NoteBadges.css
@@ -11,11 +11,11 @@
--badge-radius: 12px;
.ext-badge {
- &.temporarily-editable-badge { --color: #4fa52b; }
- &.read-only-badge { --color: #e33f3b; }
- &.share-badge { --color: #3b82f6; }
- &.clipped-note-badge { --color: #57a2a5; }
- &.execute-badge { --color: #f59e0b; }
+ &.temporarily-editable-badge {--color: var(--badge-temporaraily-editable-background-color)}
+ &.read-only-badge {--color: var(--badge-read-only-background-color);}
+ &.share-badge {--color: var(--badge-share-background-color);}
+ &.clipped-note-badge {--color: var(--badge-clipped-note-background-color);}
+ &.execute-badge {--color: var(--badge-execute-background-color);}
}
.dropdown-badge {