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/scrolling container widget: improve full-height widget handling
Adorian Doranf6afc0b71850
diff --git a/apps/client/src/stylesheets/relation_map.css b/apps/client/src/stylesheets/relation_map.cssindex 67444e5aa7..3f371d8e21 100644--- a/apps/client/src/stylesheets/relation_map.css+++ b/apps/client/src/stylesheets/relation_map.css@@ -5,7 +5,6 @@.note-detail-relation-map {height: 100%;overflow: hidden !important;- padding: 10px;position: relative;}diff --git a/apps/client/src/stylesheets/style.css b/apps/client/src/stylesheets/style.cssindex 9b04b14289..fa28df6e29 100644--- a/apps/client/src/stylesheets/style.css+++ b/apps/client/src/stylesheets/style.css@@ -2516,7 +2516,7 @@ footer.webview-footer button {transform: rotate(180deg);}-/* CK Edito */+/* CK Editor *//* Insert text snippet: limit the width of the listed items to avoid overly long names */:root body.desktop div.ck-template-form li.ck-list__item .ck-template-form__text-part > span {@@ -2546,4 +2546,18 @@ iframe.print-iframe {.excalidraw.theme--dark canvas {--theme-filter: invert(100%) hue-rotate(180deg);+}++/* Scrolling container */++.scrolling-container:has(> :is(.note-detail.full-height, .note-list-widget.full-height)) {+ display: flex;+ flex-direction: column;+}++.scrolling-container > .note-detail.full-height {+ position: relative;+ flex-grow: 1;+ width: 100%;+ height: 100%;}\ No newline at end of filediff --git a/apps/client/src/widgets/collections/NoteList.css b/apps/client/src/widgets/collections/NoteList.cssindex 21aed3ac5e..f8e5ae14e6 100644--- a/apps/client/src/widgets/collections/NoteList.css+++ b/apps/client/src/widgets/collections/NoteList.css@@ -6,7 +6,7 @@contain: none !important;}-body.prefers-centered-content .note-list-widget {+body.prefers-centered-content .note-list-widget:not(.full-height) {/* Horizontally center the widget in its parent when the "Keep content centered" option is on */margin-inline: auto;}diff --git a/apps/client/src/widgets/note_detail.ts b/apps/client/src/widgets/note_detail.tsindex b0dd8db546..afb1c24754 100644--- a/apps/client/src/widgets/note_detail.ts+++ b/apps/client/src/widgets/note_detail.ts@@ -48,10 +48,6 @@ const TPL = /*html*/`/* Horizontally center the widget in its parent when the "Keep content centered" option is on */margin-inline: auto;}-- .note-detail.full-height {- height: 100%;- }</style></div>`;diff --git a/apps/client/src/widgets/type_widgets/canvas.ts b/apps/client/src/widgets/type_widgets/canvas.tsindex bc619acea2..d31bda9dd9 100644--- a/apps/client/src/widgets/type_widgets/canvas.ts+++ b/apps/client/src/widgets/type_widgets/canvas.ts@@ -13,6 +13,10 @@ import protected_session_holder from "../../services/protected_session_holder.jsconst TPL = /*html*/`<div class="canvas-widget note-detail-canvas note-detail-printable note-detail"><style>+ .canvas-widget {+ height: 100%;+ }+.excalidraw .App-menu_top .buttonList {display: flex;}diff --git a/apps/client/src/widgets/type_widgets/relation_map.ts b/apps/client/src/widgets/type_widgets/relation_map.tsindex b69c7a94e1..88685a093e 100644--- a/apps/client/src/widgets/type_widgets/relation_map.ts+++ b/apps/client/src/widgets/type_widgets/relation_map.ts@@ -103,7 +103,7 @@ const linkOverlays = [];const TPL = /*html*/`-<div class="note-detail-relation-map note-detail-printable">+<div class="note-detail-relation-map full-height note-detail-printable"><div class="relation-map-wrapper"><div class="relation-map-container"></div></div>