Skip to content

Build your personal knowledge base with Trilium Notes

client: Improve style for code blocks

Elian Dorand2235a185b42
diff --git a/libraries/ckeditor/ckeditor-content.css b/libraries/ckeditor/ckeditor-content.css
index 770f612661..5340639b37 100644
--- a/libraries/ckeditor/ckeditor-content.css
+++ b/libraries/ckeditor/ckeditor-content.css
@@ -526,14 +526,15 @@
/* @ckeditor/ckeditor5-code-block/theme/codeblock.css */
.ck-content pre {
padding: 1em;
- border: 1px solid hsl(0, 0%, 77%);
- border-radius: 2px;
text-align: left;
direction: ltr;
tab-size: 4;
white-space: pre-wrap;
font-style: normal;
min-width: 200px;
+ border: 0px;
+ border-radius: 6px;
+ box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.2);
}
.ck-content pre:not(.hljs) {
color: hsl(0, 0%, 20.8%);
diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css
index 0738896db0..60e3752167 100644
--- a/src/public/stylesheets/style.css
+++ b/src/public/stylesheets/style.css
@@ -807,6 +807,12 @@ a.external:not(.no-arrow):after, a[href^="http://"]:not(.no-arrow):after, a[href
vertical-align: baseline !important;
}
+.ck-content pre {
+ border: 0;
+ border-radius: 6px;
+ box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.2);
+}
+
.ck-content .todo-list .todo-list__label > input:before {
border: 1px solid var(--muted-text-color) !important;
}
diff --git a/src/public/stylesheets/theme-dark.css b/src/public/stylesheets/theme-dark.css
index 718b67b5d5..04ca3ec873 100644
--- a/src/public/stylesheets/theme-dark.css
+++ b/src/public/stylesheets/theme-dark.css
@@ -92,3 +92,7 @@ body .todo-list input[type="checkbox"]:not(:checked):before {
.btn-close {
filter: invert(1);
}
+
+.ck-content pre {
+ box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.6) !important;
+}
\ No newline at end of file