Skip to content

Build your personal knowledge base with Trilium Notes

Customize the scrollbar in code boxes for WebKit-based browsers

Adorian Doranb9ebc6612200
diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css
index 740217a980..4c4aac9b7f 100644
--- a/src/public/stylesheets/style.css
+++ b/src/public/stylesheets/style.css
@@ -835,6 +835,20 @@ html .note-detail-editable-text :not(figure, .include-note):first-child {
overflow: auto;
}
+.ck-content pre code::-webkit-scrollbar {
+ height: 6px;
+}
+
+.ck-content pre code::-webkit-scrollbar-thumb {
+ height: 4px;
+ border: none !important;
+ background: gray !important;
+}
+
+.ck-content pre code::-webkit-scrollbar-track, ::-webkit-scrollbar-thumb {
+ cursor: default;
+}
+
.note-detail-printable:not(.word-wrap) pre {
white-space: pre;
margin-right: 1em;