Skip to content

Build your personal knowledge base with Trilium Notes

client/text editor/extended code blocks: tweak style

Adorian Doran57445d5ba9a5
diff --git a/apps/client/src/stylesheets/style.css b/apps/client/src/stylesheets/style.css
index c6fa28af4b..64b0409cd6 100644
--- a/apps/client/src/stylesheets/style.css
+++ b/apps/client/src/stylesheets/style.css
@@ -1528,6 +1528,10 @@ pre.code-embed-editor.read-only .cm-activeLine {
var(--_include-note-content-bottom-radius);
overflow: hidden;
+ .cm-gutters {
+ padding-inline: 4px;
+ }
+
/* `.cm-line` adds 6px before each line. */
.cm-content {
padding-block: var(--padding-size, 1em);
@@ -1535,6 +1539,23 @@ pre.code-embed-editor.read-only .cm-activeLine {
}
}
+/* CodeMirror scrolls in place of the box, so that the language label stays put. */
+.include-note-content.type-extendedCodeBlock {
+ display: flex;
+ flex-direction: column;
+
+ > .rendered-content,
+ > .rendered-content > .source-embed,
+ .code-embed-content,
+ pre.code-embed-editor,
+ .cm-editor {
+ display: flex;
+ flex: 1 1 auto;
+ flex-direction: column;
+ min-height: 0;
+ }
+}
+
/* Takes the wheel and the touch gestures for the page until the content has the focus. */
.include-note-backdrop {
position: absolute;