Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
style/markdown notes: correctly handle the max content width
Adorian Doran908f2df050c5
diff --git a/apps/client/src/widgets/type_widgets/code/Markdown.css b/apps/client/src/widgets/type_widgets/code/Markdown.cssindex 224fb0d62f..0803f53cba 100644--- a/apps/client/src/widgets/type_widgets/code/Markdown.css+++ b/apps/client/src/widgets/type_widgets/code/Markdown.css@@ -27,3 +27,22 @@}+/* Markdown preview content blocks in split-view */+.note-detail-split.split-horizontal .note-detail-split-preview > .note-detail-readonly-text-content > div {+ max-width: var(--preferred-max-content-width);++ body.prefers-centered-content & {+ margin: auto;+ }+}++/* The Markdown notes are a particular case when it comes to handling the max content width.+ * By default, is full-width, unless in preview mode. */+.note-split.mime-text-x-markdown:has(.note-detail-split.split-read-only) {+ --max-content-width: var(--preferred-max-content-width);++ .scrolling-container {+ /* Reverses .full-height rule */+ display: block;+ }+}\ No newline at end of file